Class CommonProto.Block.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderType>
com.google.protobuf.GeneratedMessageV3.Builder<CommonProto.Block.Builder>
org.bdware.bdledger.api.grpc.pb.CommonProto.Block.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable, CommonProto.BlockOrBuilder
Enclosing class:
CommonProto.Block

public static final class CommonProto.Block.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<CommonProto.Block.Builder> implements CommonProto.BlockOrBuilder
Protobuf type bdware.bdledger.api.Block
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<CommonProto.Block.Builder>
    • clear

      public CommonProto.Block.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<CommonProto.Block.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<CommonProto.Block.Builder>
    • getDefaultInstanceForType

      public CommonProto.Block getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public CommonProto.Block build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public CommonProto.Block buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      public CommonProto.Block.Builder clone()
      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<CommonProto.Block.Builder>
    • setField

      public CommonProto.Block.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<CommonProto.Block.Builder>
    • clearField

      public CommonProto.Block.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<CommonProto.Block.Builder>
    • clearOneof

      public CommonProto.Block.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<CommonProto.Block.Builder>
    • setRepeatedField

      public CommonProto.Block.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<CommonProto.Block.Builder>
    • addRepeatedField

      public CommonProto.Block.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<CommonProto.Block.Builder>
    • mergeFrom

      public CommonProto.Block.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<CommonProto.Block.Builder>
    • mergeFrom

      public CommonProto.Block.Builder mergeFrom(CommonProto.Block other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<CommonProto.Block.Builder>
    • mergeFrom

      public CommonProto.Block.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<CommonProto.Block.Builder>
      Throws:
      IOException
    • getHash

      public com.google.protobuf.ByteString getHash()
       区块的哈希,当区块处于待确认状态时为`null`
       
      bytes hash = 1;
      Specified by:
      getHash in interface CommonProto.BlockOrBuilder
      Returns:
      The hash.
    • setHash

      public CommonProto.Block.Builder setHash(com.google.protobuf.ByteString value)
       区块的哈希,当区块处于待确认状态时为`null`
       
      bytes hash = 1;
      Parameters:
      value - The hash to set.
      Returns:
      This builder for chaining.
    • clearHash

      public CommonProto.Block.Builder clearHash()
       区块的哈希,当区块处于待确认状态时为`null`
       
      bytes hash = 1;
      Returns:
      This builder for chaining.
    • getCreator

      public com.google.protobuf.ByteString getCreator()
       产块者账户地址
       
      bytes creator = 2;
      Specified by:
      getCreator in interface CommonProto.BlockOrBuilder
      Returns:
      The creator.
    • setCreator

      public CommonProto.Block.Builder setCreator(com.google.protobuf.ByteString value)
       产块者账户地址
       
      bytes creator = 2;
      Parameters:
      value - The creator to set.
      Returns:
      This builder for chaining.
    • clearCreator

      public CommonProto.Block.Builder clearCreator()
       产块者账户地址
       
      bytes creator = 2;
      Returns:
      This builder for chaining.
    • getNonce

      public long getNonce()
       这个区块之前产块者产生的区块数量
       
      uint64 nonce = 3;
      Specified by:
      getNonce in interface CommonProto.BlockOrBuilder
      Returns:
      The nonce.
    • setNonce

      public CommonProto.Block.Builder setNonce(long value)
       这个区块之前产块者产生的区块数量
       
      uint64 nonce = 3;
      Parameters:
      value - The nonce to set.
      Returns:
      This builder for chaining.
    • clearNonce

      public CommonProto.Block.Builder clearNonce()
       这个区块之前产块者产生的区块数量
       
      uint64 nonce = 3;
      Returns:
      This builder for chaining.
    • getParentHashesList

      public List<com.google.protobuf.ByteString> getParentHashesList()
       父区块的哈希
       
      repeated bytes parent_hashes = 4;
      Specified by:
      getParentHashesList in interface CommonProto.BlockOrBuilder
      Returns:
      A list containing the parentHashes.
    • getParentHashesCount

      public int getParentHashesCount()
       父区块的哈希
       
      repeated bytes parent_hashes = 4;
      Specified by:
      getParentHashesCount in interface CommonProto.BlockOrBuilder
      Returns:
      The count of parentHashes.
    • getParentHashes

      public com.google.protobuf.ByteString getParentHashes(int index)
       父区块的哈希
       
      repeated bytes parent_hashes = 4;
      Specified by:
      getParentHashes in interface CommonProto.BlockOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The parentHashes at the given index.
    • setParentHashes

      public CommonProto.Block.Builder setParentHashes(int index, com.google.protobuf.ByteString value)
       父区块的哈希
       
      repeated bytes parent_hashes = 4;
      Parameters:
      index - The index to set the value at.
      value - The parentHashes to set.
      Returns:
      This builder for chaining.
    • addParentHashes

      public CommonProto.Block.Builder addParentHashes(com.google.protobuf.ByteString value)
       父区块的哈希
       
      repeated bytes parent_hashes = 4;
      Parameters:
      value - The parentHashes to add.
      Returns:
      This builder for chaining.
    • addAllParentHashes

      public CommonProto.Block.Builder addAllParentHashes(Iterable<? extends com.google.protobuf.ByteString> values)
       父区块的哈希
       
      repeated bytes parent_hashes = 4;
      Parameters:
      values - The parentHashes to add.
      Returns:
      This builder for chaining.
    • clearParentHashes

      public CommonProto.Block.Builder clearParentHashes()
       父区块的哈希
       
      repeated bytes parent_hashes = 4;
      Returns:
      This builder for chaining.
    • getWitnessesList

      public List<com.google.protobuf.ByteString> getWitnessesList()
       见证者账户地址
       
      repeated bytes witnesses = 5;
      Specified by:
      getWitnessesList in interface CommonProto.BlockOrBuilder
      Returns:
      A list containing the witnesses.
    • getWitnessesCount

      public int getWitnessesCount()
       见证者账户地址
       
      repeated bytes witnesses = 5;
      Specified by:
      getWitnessesCount in interface CommonProto.BlockOrBuilder
      Returns:
      The count of witnesses.
    • getWitnesses

      public com.google.protobuf.ByteString getWitnesses(int index)
       见证者账户地址
       
      repeated bytes witnesses = 5;
      Specified by:
      getWitnesses in interface CommonProto.BlockOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The witnesses at the given index.
    • setWitnesses

      public CommonProto.Block.Builder setWitnesses(int index, com.google.protobuf.ByteString value)
       见证者账户地址
       
      repeated bytes witnesses = 5;
      Parameters:
      index - The index to set the value at.
      value - The witnesses to set.
      Returns:
      This builder for chaining.
    • addWitnesses

      public CommonProto.Block.Builder addWitnesses(com.google.protobuf.ByteString value)
       见证者账户地址
       
      repeated bytes witnesses = 5;
      Parameters:
      value - The witnesses to add.
      Returns:
      This builder for chaining.
    • addAllWitnesses

      public CommonProto.Block.Builder addAllWitnesses(Iterable<? extends com.google.protobuf.ByteString> values)
       见证者账户地址
       
      repeated bytes witnesses = 5;
      Parameters:
      values - The witnesses to add.
      Returns:
      This builder for chaining.
    • clearWitnesses

      public CommonProto.Block.Builder clearWitnesses()
       见证者账户地址
       
      repeated bytes witnesses = 5;
      Returns:
      This builder for chaining.
    • getTimestamp

      public long getTimestamp()
       区块产生时的 UNIX 时间戳,单位为秒
       
      int64 timestamp = 6;
      Specified by:
      getTimestamp in interface CommonProto.BlockOrBuilder
      Returns:
      The timestamp.
    • setTimestamp

      public CommonProto.Block.Builder setTimestamp(long value)
       区块产生时的 UNIX 时间戳,单位为秒
       
      int64 timestamp = 6;
      Parameters:
      value - The timestamp to set.
      Returns:
      This builder for chaining.
    • clearTimestamp

      public CommonProto.Block.Builder clearTimestamp()
       区块产生时的 UNIX 时间戳,单位为秒
       
      int64 timestamp = 6;
      Returns:
      This builder for chaining.
    • getSize

      public long getSize()
       区块大小的字节数
       
      uint64 size = 7;
      Specified by:
      getSize in interface CommonProto.BlockOrBuilder
      Returns:
      The size.
    • setSize

      public CommonProto.Block.Builder setSize(long value)
       区块大小的字节数
       
      uint64 size = 7;
      Parameters:
      value - The size to set.
      Returns:
      This builder for chaining.
    • clearSize

      public CommonProto.Block.Builder clearSize()
       区块大小的字节数
       
      uint64 size = 7;
      Returns:
      This builder for chaining.
    • getTransactionCount

      public int getTransactionCount()
       区块包含的事务数量
       
      uint32 transaction_count = 8;
      Specified by:
      getTransactionCount in interface CommonProto.BlockOrBuilder
      Returns:
      The transactionCount.
    • setTransactionCount

      public CommonProto.Block.Builder setTransactionCount(int value)
       区块包含的事务数量
       
      uint32 transaction_count = 8;
      Parameters:
      value - The transactionCount to set.
      Returns:
      This builder for chaining.
    • clearTransactionCount

      public CommonProto.Block.Builder clearTransactionCount()
       区块包含的事务数量
       
      uint32 transaction_count = 8;
      Returns:
      This builder for chaining.
    • getTransactionsRoot

      public com.google.protobuf.ByteString getTransactionsRoot()
       区块的事务默克尔树根
       
      bytes transactions_root = 9;
      Specified by:
      getTransactionsRoot in interface CommonProto.BlockOrBuilder
      Returns:
      The transactionsRoot.
    • setTransactionsRoot

      public CommonProto.Block.Builder setTransactionsRoot(com.google.protobuf.ByteString value)
       区块的事务默克尔树根
       
      bytes transactions_root = 9;
      Parameters:
      value - The transactionsRoot to set.
      Returns:
      This builder for chaining.
    • clearTransactionsRoot

      public CommonProto.Block.Builder clearTransactionsRoot()
       区块的事务默克尔树根
       
      bytes transactions_root = 9;
      Returns:
      This builder for chaining.
    • getTransactionsList

      public List<CommonProto.Transaction> getTransactionsList()
       事务对象的数组,或为空
       
      repeated .bdware.bdledger.api.Transaction transactions = 10;
      Specified by:
      getTransactionsList in interface CommonProto.BlockOrBuilder
    • getTransactionsCount

      public int getTransactionsCount()
       事务对象的数组,或为空
       
      repeated .bdware.bdledger.api.Transaction transactions = 10;
      Specified by:
      getTransactionsCount in interface CommonProto.BlockOrBuilder
    • getTransactions

      public CommonProto.Transaction getTransactions(int index)
       事务对象的数组,或为空
       
      repeated .bdware.bdledger.api.Transaction transactions = 10;
      Specified by:
      getTransactions in interface CommonProto.BlockOrBuilder
    • setTransactions

      public CommonProto.Block.Builder setTransactions(int index, CommonProto.Transaction value)
       事务对象的数组,或为空
       
      repeated .bdware.bdledger.api.Transaction transactions = 10;
    • setTransactions

      public CommonProto.Block.Builder setTransactions(int index, CommonProto.Transaction.Builder builderForValue)
       事务对象的数组,或为空
       
      repeated .bdware.bdledger.api.Transaction transactions = 10;
    • addTransactions

      public CommonProto.Block.Builder addTransactions(CommonProto.Transaction value)
       事务对象的数组,或为空
       
      repeated .bdware.bdledger.api.Transaction transactions = 10;
    • addTransactions

      public CommonProto.Block.Builder addTransactions(int index, CommonProto.Transaction value)
       事务对象的数组,或为空
       
      repeated .bdware.bdledger.api.Transaction transactions = 10;
    • addTransactions

      public CommonProto.Block.Builder addTransactions(CommonProto.Transaction.Builder builderForValue)
       事务对象的数组,或为空
       
      repeated .bdware.bdledger.api.Transaction transactions = 10;
    • addTransactions

      public CommonProto.Block.Builder addTransactions(int index, CommonProto.Transaction.Builder builderForValue)
       事务对象的数组,或为空
       
      repeated .bdware.bdledger.api.Transaction transactions = 10;
    • addAllTransactions

      public CommonProto.Block.Builder addAllTransactions(Iterable<? extends CommonProto.Transaction> values)
       事务对象的数组,或为空
       
      repeated .bdware.bdledger.api.Transaction transactions = 10;
    • clearTransactions

      public CommonProto.Block.Builder clearTransactions()
       事务对象的数组,或为空
       
      repeated .bdware.bdledger.api.Transaction transactions = 10;
    • removeTransactions

      public CommonProto.Block.Builder removeTransactions(int index)
       事务对象的数组,或为空
       
      repeated .bdware.bdledger.api.Transaction transactions = 10;
    • getTransactionsBuilder

      public CommonProto.Transaction.Builder getTransactionsBuilder(int index)
       事务对象的数组,或为空
       
      repeated .bdware.bdledger.api.Transaction transactions = 10;
    • getTransactionsOrBuilder

      public CommonProto.TransactionOrBuilder getTransactionsOrBuilder(int index)
       事务对象的数组,或为空
       
      repeated .bdware.bdledger.api.Transaction transactions = 10;
      Specified by:
      getTransactionsOrBuilder in interface CommonProto.BlockOrBuilder
    • getTransactionsOrBuilderList

      public List<? extends CommonProto.TransactionOrBuilder> getTransactionsOrBuilderList()
       事务对象的数组,或为空
       
      repeated .bdware.bdledger.api.Transaction transactions = 10;
      Specified by:
      getTransactionsOrBuilderList in interface CommonProto.BlockOrBuilder
    • addTransactionsBuilder

      public CommonProto.Transaction.Builder addTransactionsBuilder()
       事务对象的数组,或为空
       
      repeated .bdware.bdledger.api.Transaction transactions = 10;
    • addTransactionsBuilder

      public CommonProto.Transaction.Builder addTransactionsBuilder(int index)
       事务对象的数组,或为空
       
      repeated .bdware.bdledger.api.Transaction transactions = 10;
    • getTransactionsBuilderList

      public List<CommonProto.Transaction.Builder> getTransactionsBuilderList()
       事务对象的数组,或为空
       
      repeated .bdware.bdledger.api.Transaction transactions = 10;
    • getTransactionHashesList

      public List<com.google.protobuf.ByteString> getTransactionHashesList()
       20字节的事务哈希的数组,或为空
       
      repeated bytes transaction_hashes = 11;
      Specified by:
      getTransactionHashesList in interface CommonProto.BlockOrBuilder
      Returns:
      A list containing the transactionHashes.
    • getTransactionHashesCount

      public int getTransactionHashesCount()
       20字节的事务哈希的数组,或为空
       
      repeated bytes transaction_hashes = 11;
      Specified by:
      getTransactionHashesCount in interface CommonProto.BlockOrBuilder
      Returns:
      The count of transactionHashes.
    • getTransactionHashes

      public com.google.protobuf.ByteString getTransactionHashes(int index)
       20字节的事务哈希的数组,或为空
       
      repeated bytes transaction_hashes = 11;
      Specified by:
      getTransactionHashes in interface CommonProto.BlockOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The transactionHashes at the given index.
    • setTransactionHashes

      public CommonProto.Block.Builder setTransactionHashes(int index, com.google.protobuf.ByteString value)
       20字节的事务哈希的数组,或为空
       
      repeated bytes transaction_hashes = 11;
      Parameters:
      index - The index to set the value at.
      value - The transactionHashes to set.
      Returns:
      This builder for chaining.
    • addTransactionHashes

      public CommonProto.Block.Builder addTransactionHashes(com.google.protobuf.ByteString value)
       20字节的事务哈希的数组,或为空
       
      repeated bytes transaction_hashes = 11;
      Parameters:
      value - The transactionHashes to add.
      Returns:
      This builder for chaining.
    • addAllTransactionHashes

      public CommonProto.Block.Builder addAllTransactionHashes(Iterable<? extends com.google.protobuf.ByteString> values)
       20字节的事务哈希的数组,或为空
       
      repeated bytes transaction_hashes = 11;
      Parameters:
      values - The transactionHashes to add.
      Returns:
      This builder for chaining.
    • clearTransactionHashes

      public CommonProto.Block.Builder clearTransactionHashes()
       20字节的事务哈希的数组,或为空
       
      repeated bytes transaction_hashes = 11;
      Returns:
      This builder for chaining.
    • getCreatorSignature

      public com.google.protobuf.ByteString getCreatorSignature()
       产块者签名
       
      bytes creator_signature = 12;
      Specified by:
      getCreatorSignature in interface CommonProto.BlockOrBuilder
      Returns:
      The creatorSignature.
    • setCreatorSignature

      public CommonProto.Block.Builder setCreatorSignature(com.google.protobuf.ByteString value)
       产块者签名
       
      bytes creator_signature = 12;
      Parameters:
      value - The creatorSignature to set.
      Returns:
      This builder for chaining.
    • clearCreatorSignature

      public CommonProto.Block.Builder clearCreatorSignature()
       产块者签名
       
      bytes creator_signature = 12;
      Returns:
      This builder for chaining.
    • getWitnessSignaturesList

      public List<com.google.protobuf.ByteString> getWitnessSignaturesList()
       见证者签名
       
      repeated bytes witness_signatures = 13;
      Specified by:
      getWitnessSignaturesList in interface CommonProto.BlockOrBuilder
      Returns:
      A list containing the witnessSignatures.
    • getWitnessSignaturesCount

      public int getWitnessSignaturesCount()
       见证者签名
       
      repeated bytes witness_signatures = 13;
      Specified by:
      getWitnessSignaturesCount in interface CommonProto.BlockOrBuilder
      Returns:
      The count of witnessSignatures.
    • getWitnessSignatures

      public com.google.protobuf.ByteString getWitnessSignatures(int index)
       见证者签名
       
      repeated bytes witness_signatures = 13;
      Specified by:
      getWitnessSignatures in interface CommonProto.BlockOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The witnessSignatures at the given index.
    • setWitnessSignatures

      public CommonProto.Block.Builder setWitnessSignatures(int index, com.google.protobuf.ByteString value)
       见证者签名
       
      repeated bytes witness_signatures = 13;
      Parameters:
      index - The index to set the value at.
      value - The witnessSignatures to set.
      Returns:
      This builder for chaining.
    • addWitnessSignatures

      public CommonProto.Block.Builder addWitnessSignatures(com.google.protobuf.ByteString value)
       见证者签名
       
      repeated bytes witness_signatures = 13;
      Parameters:
      value - The witnessSignatures to add.
      Returns:
      This builder for chaining.
    • addAllWitnessSignatures

      public CommonProto.Block.Builder addAllWitnessSignatures(Iterable<? extends com.google.protobuf.ByteString> values)
       见证者签名
       
      repeated bytes witness_signatures = 13;
      Parameters:
      values - The witnessSignatures to add.
      Returns:
      This builder for chaining.
    • clearWitnessSignatures

      public CommonProto.Block.Builder clearWitnessSignatures()
       见证者签名
       
      repeated bytes witness_signatures = 13;
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final CommonProto.Block.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<CommonProto.Block.Builder>
    • mergeUnknownFields

      public final CommonProto.Block.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<CommonProto.Block.Builder>