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
-
Method Summary
Methods inherited from class org.stellar.sdk.AssetTypeCreditAlphaNum
equals, getCode, getIssuer, hashCode, toString
Methods 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:Asset
Returns asset type. -
fromXdr
-
toXdr
Description copied from class:Asset
Generates XDR object from a given Asset object -
compareTo
Description copied from class:Asset
Compares 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:
compareTo
in interfaceComparable<Asset>
- Specified by:
compareTo
in 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.
-