public class Tuple extends AbstractArray<Codec>
A Tuple defines an anonymous fixed-length array, where each element has its own type. It extends the base JS Array
object.
Constructor and Description |
---|
Tuple(Types.ConstructorDef types,
java.lang.Object value) |
Modifier and Type | Method and Description |
---|---|
int |
getEncodedLength()
The length of the value when encoded as a Uint8Array
|
java.util.List<java.lang.String> |
getTypes()
The types definition of the tuple
|
java.lang.String |
toString()
Returns the string representation of the value
|
byte[] |
toU8a(boolean isBare)
Encodes the value as a Uint8Array as per the parity-codec specifications
|
eq, getFiled, isEmpty, length, toHex, toJson
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
finalize, getClass, notify, notifyAll, wait, wait, wait
getConstructorCodec, toU8a
public Tuple(Types.ConstructorDef types, java.lang.Object value)
public int getEncodedLength()
The length of the value when encoded as a Uint8Array
getEncodedLength
in interface Codec
getEncodedLength
in class AbstractArray<Codec>
public java.util.List<java.lang.String> getTypes()
The types definition of the tuple
public java.lang.String toString()
Returns the string representation of the value
toString
in class java.util.AbstractCollection<Codec>
public byte[] toU8a(boolean isBare)
AbstractArray
Encodes the value as a Uint8Array as per the parity-codec specifications
toU8a
in interface Codec
toU8a
in class AbstractArray<Codec>
isBare
- true when the value has none of the type-specific prefixes (internal) Encodes the value as a Uint8Array as per the parity-codec specifications