Package io.nem.catapult.builders
Class EmbeddedMosaicAddressRestrictionTransactionBuilder
- java.lang.Object
-
- io.nem.catapult.builders.EmbeddedTransactionBuilder
-
- io.nem.catapult.builders.EmbeddedMosaicAddressRestrictionTransactionBuilder
-
- All Implemented Interfaces:
Serializer
public final class EmbeddedMosaicAddressRestrictionTransactionBuilder extends EmbeddedTransactionBuilder implements Serializer
Binary layout for an embedded mosaic address restriction transaction.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedEmbeddedMosaicAddressRestrictionTransactionBuilder(KeyDto signerPublicKey, byte version, NetworkTypeDto network, EntityTypeDto type, UnresolvedMosaicIdDto mosaicId, long restrictionKey, long previousRestrictionValue, long newRestrictionValue, UnresolvedAddressDto targetAddress)Constructor.protectedEmbeddedMosaicAddressRestrictionTransactionBuilder(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 EmbeddedMosaicAddressRestrictionTransactionBuildercreate(KeyDto signerPublicKey, byte version, NetworkTypeDto network, EntityTypeDto type, UnresolvedMosaicIdDto mosaicId, long restrictionKey, long previousRestrictionValue, long newRestrictionValue, UnresolvedAddressDto targetAddress)Creates an instance of EmbeddedMosaicAddressRestrictionTransactionBuilder.UnresolvedMosaicIdDtogetMosaicId()Gets identifier of the mosaic to which the restriction applies.longgetNewRestrictionValue()Gets new restriction value.longgetPreviousRestrictionValue()Gets previous restriction value.longgetRestrictionKey()Gets restriction key.intgetSize()Gets the size of the object.UnresolvedAddressDtogetTargetAddress()Gets address being restricted.static EmbeddedMosaicAddressRestrictionTransactionBuilderloadFromBinary(java.io.DataInputStream stream)Creates an instance of EmbeddedMosaicAddressRestrictionTransactionBuilder from a stream.byte[]serialize()Serializes an object to bytes.-
Methods inherited from class io.nem.catapult.builders.EmbeddedTransactionBuilder
create, getNetwork, getSignerPublicKey, getStreamSize, getType, getVersion
-
-
-
-
Constructor Detail
-
EmbeddedMosaicAddressRestrictionTransactionBuilder
protected EmbeddedMosaicAddressRestrictionTransactionBuilder(java.io.DataInputStream stream)
Constructor - Creates an object from stream.- Parameters:
stream- Byte stream to use to serialize the object.
-
EmbeddedMosaicAddressRestrictionTransactionBuilder
protected EmbeddedMosaicAddressRestrictionTransactionBuilder(KeyDto signerPublicKey, byte version, NetworkTypeDto network, EntityTypeDto type, UnresolvedMosaicIdDto mosaicId, long restrictionKey, long previousRestrictionValue, long newRestrictionValue, UnresolvedAddressDto targetAddress)
Constructor.- Parameters:
signerPublicKey- Entity signer's public key.version- Entity version.network- Entity network.type- Entity type.mosaicId- Identifier of the mosaic to which the restriction applies.restrictionKey- Restriction key.previousRestrictionValue- Previous restriction value.newRestrictionValue- New restriction value.targetAddress- Address being restricted.
-
-
Method Detail
-
create
public static EmbeddedMosaicAddressRestrictionTransactionBuilder create(KeyDto signerPublicKey, byte version, NetworkTypeDto network, EntityTypeDto type, UnresolvedMosaicIdDto mosaicId, long restrictionKey, long previousRestrictionValue, long newRestrictionValue, UnresolvedAddressDto targetAddress)
Creates an instance of EmbeddedMosaicAddressRestrictionTransactionBuilder.- Parameters:
signerPublicKey- Entity signer's public key.version- Entity version.network- Entity network.type- Entity type.mosaicId- Identifier of the mosaic to which the restriction applies.restrictionKey- Restriction key.previousRestrictionValue- Previous restriction value.newRestrictionValue- New restriction value.targetAddress- Address being restricted.- Returns:
- Instance of EmbeddedMosaicAddressRestrictionTransactionBuilder.
-
getMosaicId
public UnresolvedMosaicIdDto getMosaicId()
Gets identifier of the mosaic to which the restriction applies.- Returns:
- Identifier of the mosaic to which the restriction applies.
-
getRestrictionKey
public long getRestrictionKey()
Gets restriction key.- Returns:
- Restriction key.
-
getPreviousRestrictionValue
public long getPreviousRestrictionValue()
Gets previous restriction value.- Returns:
- Previous restriction value.
-
getNewRestrictionValue
public long getNewRestrictionValue()
Gets new restriction value.- Returns:
- New restriction value.
-
getTargetAddress
public UnresolvedAddressDto getTargetAddress()
Gets address being restricted.- Returns:
- Address being restricted.
-
getSize
public int getSize()
Gets the size of the object.- Specified by:
getSizein interfaceSerializer- Overrides:
getSizein classEmbeddedTransactionBuilder- Returns:
- Size in bytes.
-
loadFromBinary
public static EmbeddedMosaicAddressRestrictionTransactionBuilder loadFromBinary(java.io.DataInputStream stream)
Creates an instance of EmbeddedMosaicAddressRestrictionTransactionBuilder from a stream.- Parameters:
stream- Byte stream to use to serialize the object.- Returns:
- Instance of EmbeddedMosaicAddressRestrictionTransactionBuilder.
-
serialize
public byte[] serialize()
Serializes an object to bytes.- Specified by:
serializein interfaceSerializer- Overrides:
serializein classEmbeddedTransactionBuilder- Returns:
- Serialized bytes.
-
-