public class SCVal extends java.lang.Object implements XdrElement
union SCVal switch (SCValType type) { case SCV_BOOL: bool b; case SCV_VOID: void; case SCV_ERROR: SCError error; case SCV_U32: uint32 u32; case SCV_I32: int32 i32; case SCV_U64: uint64 u64; case SCV_I64: int64 i64; case SCV_TIMEPOINT: TimePoint timepoint; case SCV_DURATION: Duration duration; case SCV_U128: UInt128Parts u128; case SCV_I128: Int128Parts i128; case SCV_U256: UInt256Parts u256; case SCV_I256: Int256Parts i256; case SCV_BYTES: SCBytes bytes; case SCV_STRING: SCString str; case SCV_SYMBOL: SCSymbol sym; // Vec and Map are recursive so need to live // behind an option, due to xdrpp limitations. case SCV_VEC: SCVec *vec; case SCV_MAP: SCMap *map; case SCV_ADDRESS: SCAddress address; // Special SCVals reserved for system-constructed contract-data // ledger keys, not generally usable elsewhere. case SCV_CONTRACT_INSTANCE: SCContractInstance instance; case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; };
Modifier and Type | Class and Description |
---|---|
static class |
SCVal.SCValBuilder |
Constructor and Description |
---|
SCVal() |
SCVal(SCValType discriminant,
java.lang.Boolean b,
SCError error,
Uint32 u32,
Int32 i32,
Uint64 u64,
Int64 i64,
TimePoint timepoint,
Duration duration,
UInt128Parts u128,
Int128Parts i128,
UInt256Parts u256,
Int256Parts i256,
SCBytes bytes,
SCString str,
SCSymbol sym,
SCVec vec,
SCMap map,
SCAddress address,
SCContractInstance instance,
SCNonceKey nonce_key) |
toXdrBase64, toXdrByteArray
public SCVal()
public SCVal(SCValType discriminant, java.lang.Boolean b, SCError error, Uint32 u32, Int32 i32, Uint64 u64, Int64 i64, TimePoint timepoint, Duration duration, UInt128Parts u128, Int128Parts i128, UInt256Parts u256, Int256Parts i256, SCBytes bytes, SCString str, SCSymbol sym, SCVec vec, SCMap map, SCAddress address, SCContractInstance instance, SCNonceKey nonce_key)
public void encode(XdrDataOutputStream stream) throws java.io.IOException
encode
in interface XdrElement
java.io.IOException
public static SCVal decode(XdrDataInputStream stream) throws java.io.IOException
java.io.IOException
public static SCVal fromXdrBase64(java.lang.String xdr) throws java.io.IOException
java.io.IOException
public static SCVal fromXdrByteArray(byte[] xdr) throws java.io.IOException
java.io.IOException
public static SCVal.SCValBuilder builder()
public SCVal.SCValBuilder toBuilder()
public SCValType getDiscriminant()
public java.lang.Boolean getB()
public SCError getError()
public Uint32 getU32()
public Int32 getI32()
public Uint64 getU64()
public Int64 getI64()
public TimePoint getTimepoint()
public Duration getDuration()
public UInt128Parts getU128()
public Int128Parts getI128()
public UInt256Parts getU256()
public Int256Parts getI256()
public SCBytes getBytes()
public SCString getStr()
public SCSymbol getSym()
public SCVec getVec()
public SCMap getMap()
public SCAddress getAddress()
public SCContractInstance getInstance()
public SCNonceKey getNonce_key()
public void setDiscriminant(SCValType discriminant)
public void setB(java.lang.Boolean b)
public void setError(SCError error)
public void setU32(Uint32 u32)
public void setI32(Int32 i32)
public void setU64(Uint64 u64)
public void setI64(Int64 i64)
public void setTimepoint(TimePoint timepoint)
public void setDuration(Duration duration)
public void setU128(UInt128Parts u128)
public void setI128(Int128Parts i128)
public void setU256(UInt256Parts u256)
public void setI256(Int256Parts i256)
public void setBytes(SCBytes bytes)
public void setStr(SCString str)
public void setSym(SCSymbol sym)
public void setVec(SCVec vec)
public void setMap(SCMap map)
public void setAddress(SCAddress address)
public void setInstance(SCContractInstance instance)
public void setNonce_key(SCNonceKey nonce_key)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object