Package org.stellar.sdk.xdr
Class LedgerKey.LedgerKeyTrustLine
java.lang.Object
org.stellar.sdk.xdr.LedgerKey.LedgerKeyTrustLine
- All Implemented Interfaces:
XdrElement
- Enclosing class:
LedgerKey
LedgerKeyTrustLine's original definition in the XDR file is:
struct
{
AccountID accountID;
TrustLineAsset asset;
}
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionLedgerKeyTrustLine(AccountID accountID, TrustLineAsset asset) Creates a newLedgerKeyTrustLineinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static LedgerKey.LedgerKeyTrustLinedecode(XdrDataInputStream stream) static LedgerKey.LedgerKeyTrustLinedecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic LedgerKey.LedgerKeyTrustLinestatic LedgerKey.LedgerKeyTrustLinefromXdrBase64(String xdr) static LedgerKey.LedgerKeyTrustLinefromXdrByteArray(byte[] xdr) Value of theaccountIDfield.getAsset()Value of theassetfield.inthashCode()voidsetAccountID(AccountID accountID) Value of theaccountIDfield.voidsetAsset(TrustLineAsset asset) Value of theassetfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
LedgerKeyTrustLine
public LedgerKeyTrustLine() -
LedgerKeyTrustLine
Creates a newLedgerKeyTrustLineinstance.- Parameters:
accountID- theaccountIDfield valueasset- theassetfield value
-
-
Method Details
-
encode
Description copied from interface:XdrElementEncodes this value to XDR and writes it to the provided stream.- Specified by:
encodein interfaceXdrElement- Parameters:
stream- the destination XDR output stream- Throws:
IOException- if an I/O error occurs while writing the value
-
decode
public static LedgerKey.LedgerKeyTrustLine decode(XdrDataInputStream stream, int maxDepth) throws IOException - Throws:
IOException
-
decode
- Throws:
IOException
-
fromXdrBase64
- Throws:
IOException
-
fromXdrByteArray
- Throws:
IOException
-
toJson
Description copied from interface:XdrElementSerializes this value to JSON.- Specified by:
toJsonin interfaceXdrElement- Returns:
- the JSON representation of this value
-
fromJson
-
builder
-
toBuilder
-
getAccountID
Value of theaccountIDfield.- Returns:
- the
accountIDfield value
-
getAsset
Value of theassetfield.- Returns:
- the
assetfield value
-
setAccountID
Value of theaccountIDfield.- Parameters:
accountID- theaccountIDfield value
-
setAsset
Value of theassetfield.- Parameters:
asset- theassetfield value
-
equals
-
hashCode
public int hashCode() -
toString
-