Package org.polkadot.types.codec
Class Vector<T extends Codec>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<T>
-
- org.polkadot.types.codec.AbstractArray<T>
-
- org.polkadot.types.codec.Vector<T>
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.lang.Iterable<T>,java.util.Collection<T>,java.util.List<T>,java.util.RandomAccess,Codec
- Direct Known Subclasses:
Digest.AuthoritiesChange,Extrinsics,ExtrinsicStatus.Broadcast
public class Vector<T extends Codec> extends AbstractArray<T>
Vector This manages codec arrays. Internally it keeps track of the length (as decoded) and allows construction with the passed `Type` in the constructor. It is an extension to Array, providing specific encoding/decoding on top of the base type.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Vector(Types.ConstructorCodec<T> type, java.lang.Object value)
-
Method Summary
Modifier and Type Method Description java.lang.StringgetType()The type for the itemsintindexOf(java.lang.Object o)static <O extends Codec>
Types.ConstructorCodec<Vector<O>>with(Types.ConstructorCodec<O> type)-
Methods inherited from class org.polkadot.types.codec.AbstractArray
eq, getEncodedLength, getFiled, isEmpty, length, toHex, toJson, toU8a
-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
-
-
-
Constructor Detail
-
Vector
public Vector(Types.ConstructorCodec<T> type, java.lang.Object value)
-
-
Method Detail
-
with
public static <O extends Codec> Types.ConstructorCodec<Vector<O>> with(Types.ConstructorCodec<O> type)
-
getType
public java.lang.String getType()
The type for the items
-
-