public class AbstractArray<T extends Codec> extends java.util.ArrayList<T> implements Codec
AbstractArray This manages codec arrays. It is an extension to Array, providing specific encoding/decoding on top of the base type.
| Constructor and Description |
|---|
AbstractArray() |
| Modifier and Type | Method and Description |
|---|---|
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 |
getFiled(int index) |
boolean |
isEmpty()
Checks if the value is an empty value
|
int |
length()
The length of the value
|
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
|
byte[] |
toU8a(boolean isBare)
Encodes the value as a Uint8Array as per the parity-codec specifications
|
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, trimToSizefinalize, getClass, notify, notifyAll, wait, wait, waitgetConstructorCodec, toU8apublic boolean isEmpty()
Checks if the value is an empty value
public int length()
The length of the value
public int getEncodedLength()
The length of the value when encoded as a Uint8Array
getEncodedLength in interface Codecpublic 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 byte[] toU8a(boolean isBare)
Encodes the value as a Uint8Array as per the parity-codec specifications
public <T> T getFiled(int index)
callbackfn - The mapping functionthisArg - The this onject to apply the result to Maps the array with the callback