Package io.nem.symbol.catapult.builders
Class HashLockInfoBuilder
- java.lang.Object
-
- io.nem.symbol.catapult.builders.HashLockInfoBuilder
-
- All Implemented Interfaces:
Serializer
public class HashLockInfoBuilder extends java.lang.Object implements Serializer
Binary layout for hash lock transaction info
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedHashLockInfoBuilder(KeyDto senderPublicKey, MosaicBuilder mosaic, HeightDto endHeight, LockStatusDto status, Hash256Dto hash)Constructor.protectedHashLockInfoBuilder(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 HashLockInfoBuildercreate(KeyDto senderPublicKey, MosaicBuilder mosaic, HeightDto endHeight, LockStatusDto status, Hash256Dto hash)Creates an instance of HashLockInfoBuilder.HeightDtogetEndHeight()Gets height at which the lock expires.Hash256DtogetHash()Gets hash.MosaicBuildergetMosaic()Gets mosaic associated with lock.KeyDtogetSenderPublicKey()Gets sender public key.intgetSize()Gets the size of the object.LockStatusDtogetStatus()Gets flag indicating whether or not the lock was already used.static HashLockInfoBuilderloadFromBinary(java.io.DataInputStream stream)Creates an instance of HashLockInfoBuilder from a stream.byte[]serialize()Serializes an object to bytes.
-
-
-
Constructor Detail
-
HashLockInfoBuilder
protected HashLockInfoBuilder(java.io.DataInputStream stream)
Constructor - Creates an object from stream.- Parameters:
stream- Byte stream to use to serialize the object.
-
HashLockInfoBuilder
protected HashLockInfoBuilder(KeyDto senderPublicKey, MosaicBuilder mosaic, HeightDto endHeight, LockStatusDto status, Hash256Dto hash)
Constructor.- Parameters:
senderPublicKey- Sender public key.mosaic- Mosaic associated with lock.endHeight- Height at which the lock expires.status- Flag indicating whether or not the lock was already used.hash- Hash.
-
-
Method Detail
-
loadFromBinary
public static HashLockInfoBuilder loadFromBinary(java.io.DataInputStream stream)
Creates an instance of HashLockInfoBuilder from a stream.- Parameters:
stream- Byte stream to use to serialize the object.- Returns:
- Instance of HashLockInfoBuilder.
-
create
public static HashLockInfoBuilder create(KeyDto senderPublicKey, MosaicBuilder mosaic, HeightDto endHeight, LockStatusDto status, Hash256Dto hash)
Creates an instance of HashLockInfoBuilder.- Parameters:
senderPublicKey- Sender public key.mosaic- Mosaic associated with lock.endHeight- Height at which the lock expires.status- Flag indicating whether or not the lock was already used.hash- Hash.- Returns:
- Instance of HashLockInfoBuilder.
-
getSenderPublicKey
public KeyDto getSenderPublicKey()
Gets sender public key.- Returns:
- Sender public key.
-
getMosaic
public MosaicBuilder getMosaic()
Gets mosaic associated with lock.- Returns:
- Mosaic associated with lock.
-
getEndHeight
public HeightDto getEndHeight()
Gets height at which the lock expires.- Returns:
- Height at which the lock expires.
-
getStatus
public LockStatusDto getStatus()
Gets flag indicating whether or not the lock was already used.- Returns:
- Flag indicating whether or not the lock was already used.
-
getHash
public Hash256Dto getHash()
Gets hash.- Returns:
- Hash.
-
getSize
public int getSize()
Gets the size of the object.- Specified by:
getSizein interfaceSerializer- Returns:
- Size in bytes.
-
serialize
public byte[] serialize()
Serializes an object to bytes.- Specified by:
serializein interfaceSerializer- Returns:
- Serialized bytes.
-
-