Package org.stellar.sdk
Class AssetTypeCreditAlphaNum12
java.lang.Object
org.stellar.sdk.Asset
org.stellar.sdk.AssetTypeCreditAlphaNum
org.stellar.sdk.AssetTypeCreditAlphaNum12
- All Implemented Interfaces:
Comparable<Asset>
Represents all assets with codes 5-12 characters long.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Compares two assets.static AssetTypeCreditAlphaNum12
fromXdr
(AlphaNum12 alphaNum12) getType()
Returns asset type.toXdr()
Generates XDR object from a given Asset objectMethods 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
-
AssetTypeCreditAlphaNum12
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.
-