Package io.nem.symbol.catapult.builders
Class MosaicGlobalRestrictionEntryBuilder
- java.lang.Object
-
- io.nem.symbol.catapult.builders.MosaicGlobalRestrictionEntryBuilder
-
- All Implemented Interfaces:
Serializer
public class MosaicGlobalRestrictionEntryBuilder extends java.lang.Object implements Serializer
Binary layout for a mosaic restriction
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMosaicGlobalRestrictionEntryBuilder(MosaicIdDto mosaicId, GlobalKeyValueSetBuilder keyPairs)Constructor.protectedMosaicGlobalRestrictionEntryBuilder(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 MosaicGlobalRestrictionEntryBuildercreate(MosaicIdDto mosaicId, GlobalKeyValueSetBuilder keyPairs)Creates an instance of MosaicGlobalRestrictionEntryBuilder.GlobalKeyValueSetBuildergetKeyPairs()Gets global key value restriction set.MosaicIdDtogetMosaicId()Gets identifier of the mosaic to which the restriction applies.intgetSize()Gets the size of the object.static MosaicGlobalRestrictionEntryBuilderloadFromBinary(java.io.DataInputStream stream)Creates an instance of MosaicGlobalRestrictionEntryBuilder from a stream.byte[]serialize()Serializes an object to bytes.
-
-
-
Constructor Detail
-
MosaicGlobalRestrictionEntryBuilder
protected MosaicGlobalRestrictionEntryBuilder(java.io.DataInputStream stream)
Constructor - Creates an object from stream.- Parameters:
stream- Byte stream to use to serialize the object.
-
MosaicGlobalRestrictionEntryBuilder
protected MosaicGlobalRestrictionEntryBuilder(MosaicIdDto mosaicId, GlobalKeyValueSetBuilder keyPairs)
Constructor.- Parameters:
mosaicId- Identifier of the mosaic to which the restriction applies.keyPairs- Global key value restriction set.
-
-
Method Detail
-
loadFromBinary
public static MosaicGlobalRestrictionEntryBuilder loadFromBinary(java.io.DataInputStream stream)
Creates an instance of MosaicGlobalRestrictionEntryBuilder from a stream.- Parameters:
stream- Byte stream to use to serialize the object.- Returns:
- Instance of MosaicGlobalRestrictionEntryBuilder.
-
create
public static MosaicGlobalRestrictionEntryBuilder create(MosaicIdDto mosaicId, GlobalKeyValueSetBuilder keyPairs)
Creates an instance of MosaicGlobalRestrictionEntryBuilder.- Parameters:
mosaicId- Identifier of the mosaic to which the restriction applies.keyPairs- Global key value restriction set.- Returns:
- Instance of MosaicGlobalRestrictionEntryBuilder.
-
getMosaicId
public MosaicIdDto getMosaicId()
Gets identifier of the mosaic to which the restriction applies.- Returns:
- Identifier of the mosaic to which the restriction applies.
-
getKeyPairs
public GlobalKeyValueSetBuilder getKeyPairs()
Gets global key value restriction set.- Returns:
- Global key value restriction set.
-
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.
-
-