Package org.stellar.sdk
Class TrustLineAsset
java.lang.Object
org.stellar.sdk.TrustLineAsset
- All Implemented Interfaces:
Comparable<TrustLineAsset>
- Direct Known Subclasses:
LiquidityPoolShareTrustLineAsset,TrustLineAsset.Wrapper
TrustLineAsset class.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionabstract intcompareTo(@NonNull TrustLineAsset other) static TrustLineAssetParses an asset string and returns the equivalent TrustLineAsset instance.static TrustLineAssetParses type, code, issuer and returns the equivalent TrustLineAsset instance.static TrustLineAssetConverts Asset to TrustLineAssetstatic TrustLineAssetcreate(ChangeTrustAsset.Wrapper wrapper) Creates a TrustLineAsset from ChangeTrustAssetstatic TrustLineAssetCreates a TrustLineAsset from LiquidityPoolIDstatic TrustLineAssetcreate(LiquidityPoolParameters params) Creates a TrustLineAsset from LiquidityPoolParametersstatic TrustLineAssetCreate TrustLineAsset from LiquidityPoolShareChangeTrustAssetstatic TrustLineAssetcreateNonNativeAsset(String code, String issuer) Creates TrustLineAsset based on acodelength and issuer onlyabstract booleanstatic TrustLineAssetfromXdr(TrustLineAsset xdr) Generates TrustLineAsset object from a given XDR objectabstract StringgetType()Get the asset typeabstract TrustLineAssettoXdr()Generates XDR object from a given TrustLineAsset object
-
Method Details
-
create
Parses an asset string and returns the equivalent TrustLineAsset instance. The asset string is expected to either be "native" or a string of the form "CODE:ISSUER"- Parameters:
canonicalForm- Canonical string representation of an asset
-
create
Parses type, code, issuer and returns the equivalent TrustLineAsset instance.- Parameters:
type- the asset typecode- the asset codeissuer- the assset issuer- Returns:
- TrustLineAsset
-
create
Converts Asset to TrustLineAsset- Parameters:
asset- the Asset- Returns:
- TrustLineAsset
-
create
Creates a TrustLineAsset from LiquidityPoolParameters- Parameters:
params- the LiquidityPoolParameters- Returns:
- TrustLineAsset
-
create
Creates a TrustLineAsset from LiquidityPoolID- Parameters:
id- the LiquidityPoolID- Returns:
- TrustLineAsset
-
create
Creates a TrustLineAsset from ChangeTrustAsset- Parameters:
wrapper- the ChangeTrustAsset wrapper- Returns:
- TrustLineAsset
-
createNonNativeAsset
Creates TrustLineAsset based on acodelength and issuer only- Parameters:
code- the TrustLineAsset codeissuer- the TrustLineAsset issuer
-
fromXdr
Generates TrustLineAsset object from a given XDR object- Parameters:
xdr- XDR object
-
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<TrustLineAsset>
-
getType
Get the asset type- Returns:
- the asset type
-
toXdr
Generates XDR object from a given TrustLineAsset object- Returns:
- xdr model
-