类 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 struct
 
Protobuf type xchain.contract.sdk.Block
  • 方法详细资料

    • 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

      public 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

      public Contract.Block getDefaultInstanceForType()
      指定者:
      getDefaultInstanceForType 在接口中 com.google.protobuf.MessageLiteOrBuilder
      指定者:
      getDefaultInstanceForType 在接口中 com.google.protobuf.MessageOrBuilder
    • build

      public Contract.Block build()
      指定者:
      build 在接口中 com.google.protobuf.Message.Builder
      指定者:
      build 在接口中 com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Contract.Block buildPartial()
      指定者:
      buildPartial 在接口中 com.google.protobuf.Message.Builder
      指定者:
      buildPartial 在接口中 com.google.protobuf.MessageLite.Builder
    • clone

      public Contract.Block.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

      public Contract.Block.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
      指定者:
      clearField 在接口中 com.google.protobuf.Message.Builder
      覆盖:
      clearField 在类中 com.google.protobuf.GeneratedMessageV3.Builder<Contract.Block.Builder>
    • clearOneof

      public Contract.Block.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      指定者:
      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

      public Contract.Block.Builder mergeFrom​(com.google.protobuf.Message other)
      指定者:
      mergeFrom 在接口中 com.google.protobuf.Message.Builder
      覆盖:
      mergeFrom 在类中 com.google.protobuf.AbstractMessage.Builder<Contract.Block.Builder>
    • mergeFrom

      public Contract.Block.Builder mergeFrom​(Contract.Block other)
    • 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

      public String 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

      public Contract.Block.Builder setBlockid​(String value)
       blockid generate the hash sign of the block used by sha256
       
      string blockid = 3;
      参数:
      value - The blockid to set.
      返回:
      This builder for chaining.
    • clearBlockid

      public Contract.Block.Builder clearBlockid()
       blockid generate the hash sign of the block used by sha256
       
      string blockid = 3;
      返回:
      This builder for chaining.
    • setBlockidBytes

      public Contract.Block.Builder setBlockidBytes​(com.google.protobuf.ByteString value)
       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

      public String 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

      public Contract.Block.Builder setPreHash​(String value)
       pre_hash is the parent blockid of the block
       
      string pre_hash = 4;
      参数:
      value - The preHash to set.
      返回:
      This builder for chaining.
    • clearPreHash

      public Contract.Block.Builder clearPreHash()
       pre_hash is the parent blockid of the block
       
      string pre_hash = 4;
      返回:
      This builder for chaining.
    • setPreHashBytes

      public Contract.Block.Builder setPreHashBytes​(com.google.protobuf.ByteString value)
       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

      public Contract.Block.Builder setProposer​(com.google.protobuf.ByteString value)
       The miner id
       
      bytes proposer = 5;
      参数:
      value - The proposer to set.
      返回:
      This builder for chaining.
    • clearProposer

      public Contract.Block.Builder clearProposer()
       The miner id
       
      bytes proposer = 5;
      返回:
      This builder for chaining.
    • getSign

      public String 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

      public Contract.Block.Builder setSign​(String value)
       The sign which miner signed: blockid + nonce + timestamp
       
      string sign = 6;
      参数:
      value - The sign to set.
      返回:
      This builder for chaining.
    • clearSign

      public Contract.Block.Builder clearSign()
       The sign which miner signed: blockid + nonce + timestamp
       
      string sign = 6;
      返回:
      This builder for chaining.
    • setSignBytes

      public Contract.Block.Builder setSignBytes​(com.google.protobuf.ByteString value)
       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

      public Contract.Block.Builder setPubkey​(com.google.protobuf.ByteString value)
       The pk of the miner
       
      bytes pubkey = 7;
      参数:
      value - The pubkey to set.
      返回:
      This builder for chaining.
    • clearPubkey

      public Contract.Block.Builder 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

      public Contract.Block.Builder setHeight​(long value)
       The height of the blockchain
       
      int64 height = 9;
      参数:
      value - The height to set.
      返回:
      This builder for chaining.
    • clearHeight

      public Contract.Block.Builder 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

      public String getTxids​(int index)
       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

      public Contract.Block.Builder setTxids​(int index, String value)
       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

      public Contract.Block.Builder addTxids​(String value)
       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

      public Contract.Block.Builder addAllTxids​(Iterable<String> values)
       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

      public Contract.Block.Builder 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

      public Contract.Block.Builder addTxidsBytes​(com.google.protobuf.ByteString value)
       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

      public Contract.Block.Builder setTxCount​(int value)
       The transaction count of the block
       
      int32 tx_count = 12;
      参数:
      value - The txCount to set.
      返回:
      This builder for chaining.
    • clearTxCount

      public Contract.Block.Builder 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

      public Contract.Block.Builder setInTrunk​(boolean value)
      下面的属性会动态变化
       If the block is on the trunk
       
      bool in_trunk = 14;
      参数:
      value - The inTrunk to set.
      返回:
      This builder for chaining.
    • clearInTrunk

      public Contract.Block.Builder clearInTrunk()
      下面的属性会动态变化
       If the block is on the trunk
       
      bool in_trunk = 14;
      返回:
      This builder for chaining.
    • getNextHash

      public String 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

      public Contract.Block.Builder setNextHash​(String value)
       Next next block which on trunk
       
      string next_hash = 15;
      参数:
      value - The nextHash to set.
      返回:
      This builder for chaining.
    • clearNextHash

      public Contract.Block.Builder clearNextHash()
       Next next block which on trunk
       
      string next_hash = 15;
      返回:
      This builder for chaining.
    • setNextHashBytes

      public Contract.Block.Builder setNextHashBytes​(com.google.protobuf.ByteString value)
       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>