Class ImportanceSnapshotBuilder

  • All Implemented Interfaces:
    Serializer

    public class ImportanceSnapshotBuilder
    extends java.lang.Object
    implements Serializer
    Temporal importance information
    • Constructor Detail

      • ImportanceSnapshotBuilder

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

        protected ImportanceSnapshotBuilder​(ImportanceDto importance,
                                            ImportanceHeightDto height)
        Constructor.
        Parameters:
        importance - Account importance.
        height - Importance height.
    • Method Detail

      • loadFromBinary

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

        public static ImportanceSnapshotBuilder create​(ImportanceDto importance,
                                                       ImportanceHeightDto height)
        Creates an instance of ImportanceSnapshotBuilder.
        Parameters:
        importance - Account importance.
        height - Importance height.
        Returns:
        Instance of ImportanceSnapshotBuilder.
      • getImportance

        public ImportanceDto getImportance()
        Gets account importance.
        Returns:
        Account importance.
      • getHeight

        public ImportanceHeightDto getHeight()
        Gets importance height.
        Returns:
        Importance height.
      • 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.