Class CustomRoyaltyFee


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

    • CustomRoyaltyFee

      public CustomRoyaltyFee()
      Constructor.
  • Method Details

    • fromProtobuf

      static CustomRoyaltyFee fromProtobuf(RoyaltyFee royaltyFee)
      Create a custom royalty fee from a royalty fee protobuf.
      Parameters:
      royaltyFee - the royalty fee protobuf
      Returns:
      the new royalty fee object
    • deepCloneSubclass

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

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

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

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

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

      public CustomRoyaltyFee setFallbackFee(CustomFixedFee fallbackFee)
      The fallback fee is a fixed fee that is charged to the NFT receiver when there is no fungible value exchanged with the sender of the NFT.
      Parameters:
      fallbackFee - the fallback fee amount
      Returns:
      this
    • getFallbackFee

      @Nullable public CustomFixedFee getFallbackFee()
      Get the fallback fixed fee.
      Returns:
      the fallback fixed fee
    • toRoyaltyFeeProtobuf

      RoyaltyFee toRoyaltyFeeProtobuf()
      Convert the royalty 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
    • toString

      public String toString()
      Overrides:
      toString in class Object