Class HeightActivityBucketBuilder

  • All Implemented Interfaces:
    Serializer

    public class HeightActivityBucketBuilder
    extends java.lang.Object
    implements Serializer
    Account activity bucket
    • Constructor Detail

      • HeightActivityBucketBuilder

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

        protected HeightActivityBucketBuilder​(ImportanceHeightDto startHeight,
                                              AmountDto totalFeesPaid,
                                              int beneficiaryCount,
                                              long rawScore)
        Constructor.
        Parameters:
        startHeight - Activity start height.
        totalFeesPaid - Total fees paid by account.
        beneficiaryCount - Number of times account has been used as a beneficiary.
        rawScore - Raw importance score.
    • Method Detail

      • loadFromBinary

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

        public static HeightActivityBucketBuilder create​(ImportanceHeightDto startHeight,
                                                         AmountDto totalFeesPaid,
                                                         int beneficiaryCount,
                                                         long rawScore)
        Creates an instance of HeightActivityBucketBuilder.
        Parameters:
        startHeight - Activity start height.
        totalFeesPaid - Total fees paid by account.
        beneficiaryCount - Number of times account has been used as a beneficiary.
        rawScore - Raw importance score.
        Returns:
        Instance of HeightActivityBucketBuilder.
      • getStartHeight

        public ImportanceHeightDto getStartHeight()
        Gets activity start height.
        Returns:
        Activity start height.
      • getTotalFeesPaid

        public AmountDto getTotalFeesPaid()
        Gets total fees paid by account.
        Returns:
        Total fees paid by account.
      • getBeneficiaryCount

        public int getBeneficiaryCount()
        Gets number of times account has been used as a beneficiary.
        Returns:
        Number of times account has been used as a beneficiary.
      • getRawScore

        public long getRawScore()
        Gets raw importance score.
        Returns:
        Raw importance score.
      • 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.