Package io.nem.symbol.catapult.builders
Class AggregateTransactionBodyBuilder
- java.lang.Object
-
- io.nem.symbol.catapult.builders.AggregateTransactionBodyBuilder
-
- All Implemented Interfaces:
Serializer
public final class AggregateTransactionBodyBuilder extends java.lang.Object implements Serializer
Binary layout for an aggregate transaction.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAggregateTransactionBodyBuilder(Hash256Dto transactionsHash, java.util.List<EmbeddedTransactionBuilder> transactions, java.util.List<CosignatureBuilder> cosignatures)Constructor.protectedAggregateTransactionBodyBuilder(java.io.DataInputStream stream)Constructor - Creates an object from stream.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AggregateTransactionBodyBuildercreate(Hash256Dto transactionsHash, java.util.List<EmbeddedTransactionBuilder> transactions, java.util.List<CosignatureBuilder> cosignatures)Creates an instance of AggregateTransactionBodyBuilder.java.util.List<CosignatureBuilder>getCosignatures()Gets cosignatures data (fills remaining body space after transactions).intgetSize()Gets the size of the object.java.util.List<EmbeddedTransactionBuilder>getTransactions()Gets sub-transaction data (transactions are variable sized and payload size is in bytes).Hash256DtogetTransactionsHash()Gets aggregate hash of an aggregate's transactions.static AggregateTransactionBodyBuilderloadFromBinary(java.io.DataInputStream stream)Creates an instance of AggregateTransactionBodyBuilder from a stream.byte[]serialize()Serializes an object to bytes.
-
-
-
Constructor Detail
-
AggregateTransactionBodyBuilder
protected AggregateTransactionBodyBuilder(java.io.DataInputStream stream)
Constructor - Creates an object from stream.- Parameters:
stream- Byte stream to use to serialize the object.
-
AggregateTransactionBodyBuilder
protected AggregateTransactionBodyBuilder(Hash256Dto transactionsHash, java.util.List<EmbeddedTransactionBuilder> transactions, java.util.List<CosignatureBuilder> cosignatures)
Constructor.- Parameters:
transactionsHash- Aggregate hash of an aggregate's transactions.transactions- Sub-transaction data (transactions are variable sized and payload size is in bytes).cosignatures- Cosignatures data (fills remaining body space after transactions).
-
-
Method Detail
-
create
public static AggregateTransactionBodyBuilder create(Hash256Dto transactionsHash, java.util.List<EmbeddedTransactionBuilder> transactions, java.util.List<CosignatureBuilder> cosignatures)
Creates an instance of AggregateTransactionBodyBuilder.- Parameters:
transactionsHash- Aggregate hash of an aggregate's transactions.transactions- Sub-transaction data (transactions are variable sized and payload size is in bytes).cosignatures- Cosignatures data (fills remaining body space after transactions).- Returns:
- Instance of AggregateTransactionBodyBuilder.
-
getTransactionsHash
public Hash256Dto getTransactionsHash()
Gets aggregate hash of an aggregate's transactions.- Returns:
- Aggregate hash of an aggregate's transactions.
-
getTransactions
public java.util.List<EmbeddedTransactionBuilder> getTransactions()
Gets sub-transaction data (transactions are variable sized and payload size is in bytes).- Returns:
- Sub-transaction data (transactions are variable sized and payload size is in bytes).
-
getCosignatures
public java.util.List<CosignatureBuilder> getCosignatures()
Gets cosignatures data (fills remaining body space after transactions).- Returns:
- Cosignatures data (fills remaining body space after transactions).
-
getSize
public int getSize()
Gets the size of the object.- Specified by:
getSizein interfaceSerializer- Returns:
- Size in bytes.
-
loadFromBinary
public static AggregateTransactionBodyBuilder loadFromBinary(java.io.DataInputStream stream)
Creates an instance of AggregateTransactionBodyBuilder from a stream.- Parameters:
stream- Byte stream to use to serialize the object.- Returns:
- Instance of AggregateTransactionBodyBuilder.
-
serialize
public byte[] serialize()
Serializes an object to bytes.- Specified by:
serializein interfaceSerializer- Returns:
- Serialized bytes.
-
-