public class Struct extends java.util.LinkedHashMap<java.lang.String,Codec> implements Codec
Constructor and Description |
---|
Struct(Types.ConstructorDef constructorDef,
java.lang.Object value) |
Struct(Types.ConstructorDef constructorDef,
java.lang.Object value,
java.util.Map<java.lang.String,java.lang.String> json) |
Modifier and Type | Method and Description |
---|---|
static Types.ConstructorCodec<Struct> |
builder() |
boolean |
eq(java.lang.Object other)
Compares the value of the input to see if there is a match
|
int |
getEncodedLength()
The length of the value when encoded as a Uint8Array
|
<T> T |
getField(java.lang.String key) |
boolean |
isEmpty()
Checks if the value is an empty value
|
java.util.List<Codec> |
toArray()
Converts the Object to an standard JavaScript Array
|
java.lang.String |
toHex()
Returns a hex string representation of the value
|
java.lang.Object |
toJson()
Converts the Object to JSON, typically used for RPC transfers
|
java.lang.String |
toString() |
byte[] |
toU8a(boolean isBare)
Encodes the value as a Uint8Array as per the parity-codec specifications
|
static Types.ConstructorCodec<Struct> |
with(Types.ConstructorDef types) |
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
clone, compute, computeIfAbsent, computeIfPresent, containsKey, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
finalize, getClass, notify, notifyAll, wait, wait, wait
getConstructorCodec, toU8a
public Struct(Types.ConstructorDef constructorDef, java.lang.Object value, java.util.Map<java.lang.String,java.lang.String> json)
public Struct(Types.ConstructorDef constructorDef, java.lang.Object value)
public static Types.ConstructorCodec<Struct> with(Types.ConstructorDef types)
public int getEncodedLength()
The length of the value when encoded as a Uint8Array
getEncodedLength
in interface Codec
public java.util.List<Codec> toArray()
Converts the Object to an standard JavaScript Array
public boolean eq(java.lang.Object other)
Compares the value of the input to see if there is a match
public java.lang.String toHex()
Returns a hex string representation of the value
public java.lang.Object toJson()
Converts the Object to JSON, typically used for RPC transfers
public java.lang.String toString()
toString
in class java.util.AbstractMap<java.lang.String,Codec>
public byte[] toU8a(boolean isBare)
Encodes the value as a Uint8Array as per the parity-codec specifications
public static Types.ConstructorCodec<Struct> builder()
public <T> T getField(java.lang.String key)