Class MosaicAddressRestrictionTransactionBodyBuilder

  • All Implemented Interfaces:
    Serializer

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

      • MosaicAddressRestrictionTransactionBodyBuilder

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

        protected MosaicAddressRestrictionTransactionBodyBuilder​(UnresolvedMosaicIdDto mosaicId,
                                                                 long restrictionKey,
                                                                 long previousRestrictionValue,
                                                                 long newRestrictionValue,
                                                                 UnresolvedAddressDto targetAddress)
        Constructor.
        Parameters:
        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

      • loadFromBinary

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

        public static MosaicAddressRestrictionTransactionBodyBuilder create​(UnresolvedMosaicIdDto mosaicId,
                                                                            long restrictionKey,
                                                                            long previousRestrictionValue,
                                                                            long newRestrictionValue,
                                                                            UnresolvedAddressDto targetAddress)
        Creates an instance of MosaicAddressRestrictionTransactionBodyBuilder.
        Parameters:
        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 MosaicAddressRestrictionTransactionBodyBuilder.
      • 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:
        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.