Class CustomFractionalFee


public class CustomFractionalFee extends CustomFeeBase<CustomFractionalFee>
Custom fractional fee utility class. See Hedera Documentation
  • Constructor Details

    • CustomFractionalFee

      public CustomFractionalFee()
      Constructor.
  • Method Details

    • fromProtobuf

      static CustomFractionalFee fromProtobuf(FractionalFee fractionalFee)
      Create a custom fractional fee from a fee protobuf.
      Parameters:
      fractionalFee - the fractional fee protobuf
      Returns:
      the new custom fractional fee object
    • deepCloneSubclass

      CustomFractionalFee deepCloneSubclass()
      Specified by:
      deepCloneSubclass in class CustomFeeBase<CustomFractionalFee>
    • getNumerator

      public long getNumerator()
      Extract the numerator.
      Returns:
      the numerator
    • setNumerator

      public CustomFractionalFee setNumerator(long numerator)
      Assign the numerator.
      Parameters:
      numerator - the numerator
      Returns:
      this
    • getDenominator

      public long getDenominator()
      Extract the denominator.
      Returns:
      the denominator
    • setDenominator

      public CustomFractionalFee setDenominator(long denominator)
      Assign the denominator can not be zero (0).
      Parameters:
      denominator - the denominator
      Returns:
      this
    • getMin

      public long getMin()
      Extract the minimum fee amount.
      Returns:
      the minimum fee amount
    • setMin

      public CustomFractionalFee setMin(long min)
      Assign the minimum fee amount.
      Parameters:
      min - the fee amount
      Returns:
      this
    • getMax

      public long getMax()
      Extract the fee amount.
      Returns:
      the fee amount
    • setMax

      public CustomFractionalFee setMax(long max)
      Assign the maximum fee amount.
      Parameters:
      max - the fee amount
      Returns:
      this
    • getAssessmentMethod

      public FeeAssessmentMethod getAssessmentMethod()
      Extract the assessment method inclusive / exclusive.
      Returns:
      the assessment method inclusive / exclusive
    • setAssessmentMethod

      public CustomFractionalFee setAssessmentMethod(FeeAssessmentMethod assessmentMethod)
      Assign the assessment method inclusive / exclusive.

      If the assessment method field is set, the token's custom fee is charged to the sending account and the receiving account receives the full token transfer amount. If this field is set to false, the receiver pays for the token custom fees and gets the remaining token balance. INCLUSIVE(false) EXCLUSIVE(true) See Hedera Documentation

      Parameters:
      assessmentMethod - inclusive / exclusive
      Returns:
      this
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toFractionalFeeProtobuf

      FractionalFee toFractionalFeeProtobuf()
      Convert the fractional fee object to a protobuf.
      Returns:
      the protobuf object
    • toProtobuf

      CustomFee toProtobuf()
      Description copied from class: CustomFee
      Create the protobuf.
      Specified by:
      toProtobuf in class CustomFee
      Returns:
      the protobuf for the custom fee object