Package org.stellar.sdk
Class AssetTypeCreditAlphaNum4
java.lang.Object
org.stellar.sdk.Asset
org.stellar.sdk.AssetTypeCreditAlphaNum
org.stellar.sdk.AssetTypeCreditAlphaNum4
- All Implemented Interfaces:
Comparable<Asset>
Represents all assets with codes 1-4 characters long.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.stellar.sdk.AssetTypeCreditAlphaNum
equals, getCode, getIssuer, hashCode, toStringMethods inherited from class org.stellar.sdk.Asset
create, create, createNativeAsset, createNonNativeAsset, fromXdr, getContractId
-
Constructor Details
-
AssetTypeCreditAlphaNum4
Class constructor- Parameters:
code- Asset codeissuer- Asset issuer- Throws:
IllegalArgumentException- when code is invalid
-
-
Method Details
-
getType
Description copied from class:AssetReturns asset type. -
fromXdr
-
toXdr
Description copied from class:AssetGenerates XDR object from a given Asset object -
compareTo
Description copied from class:AssetCompares two assets.- First compare the type (eg. native before alphanum4 before alphanum12).
- If the types are equal, compare the assets codes.
- If the asset codes are equal, compare the issuers.
- Specified by:
compareToin interfaceComparable<Asset>- Specified by:
compareToin classAsset- Parameters:
other- the object to be compared.- Returns:
- a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
-