Custom royalty fee utility class.
See Hedera Documentation
-
Field Summary
Fields inherited from class com.hedera.hashgraph.sdk.CustomFee
allCollectorsAreExempt, feeCollectorAccountId -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) CustomRoyaltyFee(package private) static CustomRoyaltyFeefromProtobuf(RoyaltyFee royaltyFee) Create a custom royalty fee from a royalty fee protobuf.longExtract the denominator.Get the fallback fixed fee.longExtract the numerator.setDenominator(long denominator) Assign the denominator can not be zero (0).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.setNumerator(long numerator) Assign the numerator.(package private) CustomFeeCreate the protobuf.(package private) RoyaltyFeeConvert the royalty fee object to a protobuf.toString()Methods inherited from class com.hedera.hashgraph.sdk.CustomFeeBase
deepClone, finishDeepClone, setAllCollectorsAreExempt, setFeeCollectorAccountIdMethods inherited from class com.hedera.hashgraph.sdk.CustomFee
deepCloneList, finishToProtobuf, fromBytes, fromProtobuf, fromProtobufInner, getAllCollectorsAreExempt, getFeeCollectorAccountId, toBytes, toStringHelper, validateChecksums
-
Constructor Details
-
CustomRoyaltyFee
public CustomRoyaltyFee()Constructor.
-
-
Method Details
-
fromProtobuf
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:
deepCloneSubclassin classCustomFeeBase<CustomRoyaltyFee>
-
getNumerator
public long getNumerator()Extract the numerator.- Returns:
- the numerator
-
setNumerator
Assign the numerator.- Parameters:
numerator- the numerator- Returns:
this
-
getDenominator
public long getDenominator()Extract the denominator.- Returns:
- the denominator
-
setDenominator
Assign the denominator can not be zero (0).- Parameters:
denominator- the denominator- Returns:
this
-
setFallbackFee
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
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:CustomFeeCreate the protobuf.- Specified by:
toProtobufin classCustomFee- Returns:
- the protobuf for the custom fee object
-
toString
-