类 Contract.Block.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderType>
com.google.protobuf.GeneratedMessageV3.Builder<Contract.Block.Builder>
com.baidu.xuper.contractpb.Contract.Block.Builder
- 所有已实现的接口:
Contract.BlockOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- 封闭类:
- Contract.Block
public static final class Contract.Block.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Contract.Block.Builder> implements Contract.BlockOrBuilder
The block structProtobuf type
xchain.contract.sdk.Block-
方法概要
修饰符和类型 方法 说明 Contract.Block.BuilderaddAllTxids(Iterable<String> values)Transactions of the block, only txid stored on kv, the detail information stored in another tableContract.Block.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)Contract.Block.BuilderaddTxids(String value)Transactions of the block, only txid stored on kv, the detail information stored in another tableContract.Block.BuilderaddTxidsBytes(com.google.protobuf.ByteString value)Transactions of the block, only txid stored on kv, the detail information stored in another tableContract.Blockbuild()Contract.BlockbuildPartial()Contract.Block.Builderclear()Contract.Block.BuilderclearBlockid()blockid generate the hash sign of the block used by sha256Contract.Block.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)Contract.Block.BuilderclearHeight()The height of the blockchainContract.Block.BuilderclearInTrunk()下面的属性会动态变化 If the block is on the trunkContract.Block.BuilderclearNextHash()Next next block which on trunkContract.Block.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)Contract.Block.BuilderclearPreHash()pre_hash is the parent blockid of the blockContract.Block.BuilderclearProposer()The miner idContract.Block.BuilderclearPubkey()The pk of the minerContract.Block.BuilderclearSign()The sign which miner signed: blockid + nonce + timestampContract.Block.BuilderclearTxCount()The transaction count of the blockContract.Block.BuilderclearTxids()Transactions of the block, only txid stored on kv, the detail information stored in another tableContract.Block.Builderclone()StringgetBlockid()blockid generate the hash sign of the block used by sha256com.google.protobuf.ByteStringgetBlockidBytes()blockid generate the hash sign of the block used by sha256Contract.BlockgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()longgetHeight()The height of the blockchainbooleangetInTrunk()下面的属性会动态变化 If the block is on the trunkStringgetNextHash()Next next block which on trunkcom.google.protobuf.ByteStringgetNextHashBytes()Next next block which on trunkStringgetPreHash()pre_hash is the parent blockid of the blockcom.google.protobuf.ByteStringgetPreHashBytes()pre_hash is the parent blockid of the blockcom.google.protobuf.ByteStringgetProposer()The miner idcom.google.protobuf.ByteStringgetPubkey()The pk of the minerStringgetSign()The sign which miner signed: blockid + nonce + timestampcom.google.protobuf.ByteStringgetSignBytes()The sign which miner signed: blockid + nonce + timestampintgetTxCount()The transaction count of the blockStringgetTxids(int index)Transactions of the block, only txid stored on kv, the detail information stored in another tablecom.google.protobuf.ByteStringgetTxidsBytes(int index)Transactions of the block, only txid stored on kv, the detail information stored in another tableintgetTxidsCount()Transactions of the block, only txid stored on kv, the detail information stored in another tablecom.google.protobuf.ProtocolStringListgetTxidsList()Transactions of the block, only txid stored on kv, the detail information stored in another tableprotected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()Contract.Block.BuildermergeFrom(Contract.Block other)Contract.Block.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)Contract.Block.BuildermergeFrom(com.google.protobuf.Message other)Contract.Block.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)Contract.Block.BuildersetBlockid(String value)blockid generate the hash sign of the block used by sha256Contract.Block.BuildersetBlockidBytes(com.google.protobuf.ByteString value)blockid generate the hash sign of the block used by sha256Contract.Block.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)Contract.Block.BuildersetHeight(long value)The height of the blockchainContract.Block.BuildersetInTrunk(boolean value)下面的属性会动态变化 If the block is on the trunkContract.Block.BuildersetNextHash(String value)Next next block which on trunkContract.Block.BuildersetNextHashBytes(com.google.protobuf.ByteString value)Next next block which on trunkContract.Block.BuildersetPreHash(String value)pre_hash is the parent blockid of the blockContract.Block.BuildersetPreHashBytes(com.google.protobuf.ByteString value)pre_hash is the parent blockid of the blockContract.Block.BuildersetProposer(com.google.protobuf.ByteString value)The miner idContract.Block.BuildersetPubkey(com.google.protobuf.ByteString value)The pk of the minerContract.Block.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)Contract.Block.BuildersetSign(String value)The sign which miner signed: blockid + nonce + timestampContract.Block.BuildersetSignBytes(com.google.protobuf.ByteString value)The sign which miner signed: blockid + nonce + timestampContract.Block.BuildersetTxCount(int value)The transaction count of the blockContract.Block.BuildersetTxids(int index, String value)Transactions of the block, only txid stored on kv, the detail information stored in another tableContract.Block.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)从类继承的方法 com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3从类继承的方法 com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString从类继承的方法 com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeFrom, newUninitializedMessageException从接口继承的方法 com.google.protobuf.MessageLite.Builder
mergeFrom从接口继承的方法 com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
方法详细资料
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- 指定者:
internalGetFieldAccessorTable在类中com.google.protobuf.GeneratedMessageV3.Builder<Contract.Block.Builder>
-
clear
- 指定者:
clear在接口中com.google.protobuf.Message.Builder- 指定者:
clear在接口中com.google.protobuf.MessageLite.Builder- 覆盖:
clear在类中com.google.protobuf.GeneratedMessageV3.Builder<Contract.Block.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- 指定者:
getDescriptorForType在接口中com.google.protobuf.Message.Builder- 指定者:
getDescriptorForType在接口中com.google.protobuf.MessageOrBuilder- 覆盖:
getDescriptorForType在类中com.google.protobuf.GeneratedMessageV3.Builder<Contract.Block.Builder>
-
getDefaultInstanceForType
- 指定者:
getDefaultInstanceForType在接口中com.google.protobuf.MessageLiteOrBuilder- 指定者:
getDefaultInstanceForType在接口中com.google.protobuf.MessageOrBuilder
-
build
- 指定者:
build在接口中com.google.protobuf.Message.Builder- 指定者:
build在接口中com.google.protobuf.MessageLite.Builder
-
buildPartial
- 指定者:
buildPartial在接口中com.google.protobuf.Message.Builder- 指定者:
buildPartial在接口中com.google.protobuf.MessageLite.Builder
-
clone
- 指定者:
clone在接口中com.google.protobuf.Message.Builder- 指定者:
clone在接口中com.google.protobuf.MessageLite.Builder- 覆盖:
clone在类中com.google.protobuf.GeneratedMessageV3.Builder<Contract.Block.Builder>
-
setField
public Contract.Block.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)- 指定者:
setField在接口中com.google.protobuf.Message.Builder- 覆盖:
setField在类中com.google.protobuf.GeneratedMessageV3.Builder<Contract.Block.Builder>
-
clearField
- 指定者:
clearField在接口中com.google.protobuf.Message.Builder- 覆盖:
clearField在类中com.google.protobuf.GeneratedMessageV3.Builder<Contract.Block.Builder>
-
clearOneof
- 指定者:
clearOneof在接口中com.google.protobuf.Message.Builder- 覆盖:
clearOneof在类中com.google.protobuf.GeneratedMessageV3.Builder<Contract.Block.Builder>
-
setRepeatedField
public Contract.Block.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)- 指定者:
setRepeatedField在接口中com.google.protobuf.Message.Builder- 覆盖:
setRepeatedField在类中com.google.protobuf.GeneratedMessageV3.Builder<Contract.Block.Builder>
-
addRepeatedField
public Contract.Block.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)- 指定者:
addRepeatedField在接口中com.google.protobuf.Message.Builder- 覆盖:
addRepeatedField在类中com.google.protobuf.GeneratedMessageV3.Builder<Contract.Block.Builder>
-
mergeFrom
- 指定者:
mergeFrom在接口中com.google.protobuf.Message.Builder- 覆盖:
mergeFrom在类中com.google.protobuf.AbstractMessage.Builder<Contract.Block.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- 指定者:
isInitialized在接口中com.google.protobuf.MessageLiteOrBuilder- 覆盖:
isInitialized在类中com.google.protobuf.GeneratedMessageV3.Builder<Contract.Block.Builder>
-
mergeFrom
public Contract.Block.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException- 指定者:
mergeFrom在接口中com.google.protobuf.Message.Builder- 指定者:
mergeFrom在接口中com.google.protobuf.MessageLite.Builder- 覆盖:
mergeFrom在类中com.google.protobuf.AbstractMessage.Builder<Contract.Block.Builder>- 抛出:
IOException
-
getBlockid
blockid generate the hash sign of the block used by sha256
string blockid = 3;- 指定者:
getBlockid在接口中Contract.BlockOrBuilder- 返回:
- The blockid.
-
getBlockidBytes
public com.google.protobuf.ByteString getBlockidBytes()blockid generate the hash sign of the block used by sha256
string blockid = 3;- 指定者:
getBlockidBytes在接口中Contract.BlockOrBuilder- 返回:
- The bytes for blockid.
-
setBlockid
blockid generate the hash sign of the block used by sha256
string blockid = 3;- 参数:
value- The blockid to set.- 返回:
- This builder for chaining.
-
clearBlockid
blockid generate the hash sign of the block used by sha256
string blockid = 3;- 返回:
- This builder for chaining.
-
setBlockidBytes
blockid generate the hash sign of the block used by sha256
string blockid = 3;- 参数:
value- The bytes for blockid to set.- 返回:
- This builder for chaining.
-
getPreHash
pre_hash is the parent blockid of the block
string pre_hash = 4;- 指定者:
getPreHash在接口中Contract.BlockOrBuilder- 返回:
- The preHash.
-
getPreHashBytes
public com.google.protobuf.ByteString getPreHashBytes()pre_hash is the parent blockid of the block
string pre_hash = 4;- 指定者:
getPreHashBytes在接口中Contract.BlockOrBuilder- 返回:
- The bytes for preHash.
-
setPreHash
pre_hash is the parent blockid of the block
string pre_hash = 4;- 参数:
value- The preHash to set.- 返回:
- This builder for chaining.
-
clearPreHash
pre_hash is the parent blockid of the block
string pre_hash = 4;- 返回:
- This builder for chaining.
-
setPreHashBytes
pre_hash is the parent blockid of the block
string pre_hash = 4;- 参数:
value- The bytes for preHash to set.- 返回:
- This builder for chaining.
-
getProposer
public com.google.protobuf.ByteString getProposer()The miner id
bytes proposer = 5;- 指定者:
getProposer在接口中Contract.BlockOrBuilder- 返回:
- The proposer.
-
setProposer
The miner id
bytes proposer = 5;- 参数:
value- The proposer to set.- 返回:
- This builder for chaining.
-
clearProposer
The miner id
bytes proposer = 5;- 返回:
- This builder for chaining.
-
getSign
The sign which miner signed: blockid + nonce + timestamp
string sign = 6;- 指定者:
getSign在接口中Contract.BlockOrBuilder- 返回:
- The sign.
-
getSignBytes
public com.google.protobuf.ByteString getSignBytes()The sign which miner signed: blockid + nonce + timestamp
string sign = 6;- 指定者:
getSignBytes在接口中Contract.BlockOrBuilder- 返回:
- The bytes for sign.
-
setSign
The sign which miner signed: blockid + nonce + timestamp
string sign = 6;- 参数:
value- The sign to set.- 返回:
- This builder for chaining.
-
clearSign
The sign which miner signed: blockid + nonce + timestamp
string sign = 6;- 返回:
- This builder for chaining.
-
setSignBytes
The sign which miner signed: blockid + nonce + timestamp
string sign = 6;- 参数:
value- The bytes for sign to set.- 返回:
- This builder for chaining.
-
getPubkey
public com.google.protobuf.ByteString getPubkey()The pk of the miner
bytes pubkey = 7;- 指定者:
getPubkey在接口中Contract.BlockOrBuilder- 返回:
- The pubkey.
-
setPubkey
The pk of the miner
bytes pubkey = 7;- 参数:
value- The pubkey to set.- 返回:
- This builder for chaining.
-
clearPubkey
The pk of the miner
bytes pubkey = 7;- 返回:
- This builder for chaining.
-
getHeight
public long getHeight()The height of the blockchain
int64 height = 9;- 指定者:
getHeight在接口中Contract.BlockOrBuilder- 返回:
- The height.
-
setHeight
The height of the blockchain
int64 height = 9;- 参数:
value- The height to set.- 返回:
- This builder for chaining.
-
clearHeight
The height of the blockchain
int64 height = 9;- 返回:
- This builder for chaining.
-
getTxidsList
public com.google.protobuf.ProtocolStringList getTxidsList()Transactions of the block, only txid stored on kv, the detail information stored in another table
repeated string txids = 11;- 指定者:
getTxidsList在接口中Contract.BlockOrBuilder- 返回:
- A list containing the txids.
-
getTxidsCount
public int getTxidsCount()Transactions of the block, only txid stored on kv, the detail information stored in another table
repeated string txids = 11;- 指定者:
getTxidsCount在接口中Contract.BlockOrBuilder- 返回:
- The count of txids.
-
getTxids
Transactions of the block, only txid stored on kv, the detail information stored in another table
repeated string txids = 11;- 指定者:
getTxids在接口中Contract.BlockOrBuilder- 参数:
index- The index of the element to return.- 返回:
- The txids at the given index.
-
getTxidsBytes
public com.google.protobuf.ByteString getTxidsBytes(int index)Transactions of the block, only txid stored on kv, the detail information stored in another table
repeated string txids = 11;- 指定者:
getTxidsBytes在接口中Contract.BlockOrBuilder- 参数:
index- The index of the value to return.- 返回:
- The bytes of the txids at the given index.
-
setTxids
Transactions of the block, only txid stored on kv, the detail information stored in another table
repeated string txids = 11;- 参数:
index- The index to set the value at.value- The txids to set.- 返回:
- This builder for chaining.
-
addTxids
Transactions of the block, only txid stored on kv, the detail information stored in another table
repeated string txids = 11;- 参数:
value- The txids to add.- 返回:
- This builder for chaining.
-
addAllTxids
Transactions of the block, only txid stored on kv, the detail information stored in another table
repeated string txids = 11;- 参数:
values- The txids to add.- 返回:
- This builder for chaining.
-
clearTxids
Transactions of the block, only txid stored on kv, the detail information stored in another table
repeated string txids = 11;- 返回:
- This builder for chaining.
-
addTxidsBytes
Transactions of the block, only txid stored on kv, the detail information stored in another table
repeated string txids = 11;- 参数:
value- The bytes of the txids to add.- 返回:
- This builder for chaining.
-
getTxCount
public int getTxCount()The transaction count of the block
int32 tx_count = 12;- 指定者:
getTxCount在接口中Contract.BlockOrBuilder- 返回:
- The txCount.
-
setTxCount
The transaction count of the block
int32 tx_count = 12;- 参数:
value- The txCount to set.- 返回:
- This builder for chaining.
-
clearTxCount
The transaction count of the block
int32 tx_count = 12;- 返回:
- This builder for chaining.
-
getInTrunk
public boolean getInTrunk()下面的属性会动态变化 If the block is on the trunk
bool in_trunk = 14;- 指定者:
getInTrunk在接口中Contract.BlockOrBuilder- 返回:
- The inTrunk.
-
setInTrunk
下面的属性会动态变化 If the block is on the trunk
bool in_trunk = 14;- 参数:
value- The inTrunk to set.- 返回:
- This builder for chaining.
-
clearInTrunk
下面的属性会动态变化 If the block is on the trunk
bool in_trunk = 14;- 返回:
- This builder for chaining.
-
getNextHash
Next next block which on trunk
string next_hash = 15;- 指定者:
getNextHash在接口中Contract.BlockOrBuilder- 返回:
- The nextHash.
-
getNextHashBytes
public com.google.protobuf.ByteString getNextHashBytes()Next next block which on trunk
string next_hash = 15;- 指定者:
getNextHashBytes在接口中Contract.BlockOrBuilder- 返回:
- The bytes for nextHash.
-
setNextHash
Next next block which on trunk
string next_hash = 15;- 参数:
value- The nextHash to set.- 返回:
- This builder for chaining.
-
clearNextHash
Next next block which on trunk
string next_hash = 15;- 返回:
- This builder for chaining.
-
setNextHashBytes
Next next block which on trunk
string next_hash = 15;- 参数:
value- The bytes for nextHash to set.- 返回:
- This builder for chaining.
-
setUnknownFields
public final Contract.Block.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)- 指定者:
setUnknownFields在接口中com.google.protobuf.Message.Builder- 覆盖:
setUnknownFields在类中com.google.protobuf.GeneratedMessageV3.Builder<Contract.Block.Builder>
-
mergeUnknownFields
public final Contract.Block.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)- 指定者:
mergeUnknownFields在接口中com.google.protobuf.Message.Builder- 覆盖:
mergeUnknownFields在类中com.google.protobuf.GeneratedMessageV3.Builder<Contract.Block.Builder>
-