Class MosaicAddressRestrictionEntryBuilder

  • All Implemented Interfaces:
    Serializer

    public class MosaicAddressRestrictionEntryBuilder
    extends java.lang.Object
    implements Serializer
    Binary layout for a mosaic restriction
    • Constructor Detail

      • MosaicAddressRestrictionEntryBuilder

        protected MosaicAddressRestrictionEntryBuilder​(java.io.DataInputStream stream)
        Constructor - Creates an object from stream.
        Parameters:
        stream - Byte stream to use to serialize the object.
      • MosaicAddressRestrictionEntryBuilder

        protected MosaicAddressRestrictionEntryBuilder​(MosaicIdDto mosaicId,
                                                       AddressDto address,
                                                       AddressKeyValueSetBuilder keyPairs)
        Constructor.
        Parameters:
        mosaicId - Identifier of the mosaic to which the restriction applies.
        address - Address being restricted.
        keyPairs - Address key value restriction set.
    • Method Detail

      • loadFromBinary

        public static MosaicAddressRestrictionEntryBuilder loadFromBinary​(java.io.DataInputStream stream)
        Creates an instance of MosaicAddressRestrictionEntryBuilder from a stream.
        Parameters:
        stream - Byte stream to use to serialize the object.
        Returns:
        Instance of MosaicAddressRestrictionEntryBuilder.
      • create

        public static MosaicAddressRestrictionEntryBuilder create​(MosaicIdDto mosaicId,
                                                                  AddressDto address,
                                                                  AddressKeyValueSetBuilder keyPairs)
        Creates an instance of MosaicAddressRestrictionEntryBuilder.
        Parameters:
        mosaicId - Identifier of the mosaic to which the restriction applies.
        address - Address being restricted.
        keyPairs - Address key value restriction set.
        Returns:
        Instance of MosaicAddressRestrictionEntryBuilder.
      • getMosaicId

        public MosaicIdDto getMosaicId()
        Gets identifier of the mosaic to which the restriction applies.
        Returns:
        Identifier of the mosaic to which the restriction applies.
      • getAddress

        public AddressDto getAddress()
        Gets address being restricted.
        Returns:
        Address being restricted.
      • getKeyPairs

        public AddressKeyValueSetBuilder getKeyPairs()
        Gets address key value restriction set.
        Returns:
        Address key value restriction set.
      • getSize

        public int getSize()
        Gets the size of the object.
        Specified by:
        getSize in interface Serializer
        Returns:
        Size in bytes.
      • serialize

        public byte[] serialize()
        Serializes an object to bytes.
        Specified by:
        serialize in interface Serializer
        Returns:
        Serialized bytes.