E
- array element typepublic class ObjectArrayType<E> extends ArrayType<E[],E>
In the binary encoding, array elements are simply concatenated, with each element preceded by a 0x01
byte.
After the last element, a final 0x00
byte follows. This encoding ensures lexicographic ordering.
ARRAY_SUFFIX, MAX_DIMENSIONS
name, NAME_PATTERN, REFERENCE_TYPE_NAME, signature, typeToken
Constructor and Description |
---|
ObjectArrayType(FieldType<E> elementType) |
Modifier and Type | Method and Description |
---|---|
protected E[] |
createArray(List<E> elements)
Create a new array instance containing the given elements.
|
protected E |
getArrayElement(E[] array,
int index)
Get an element from the given array.
|
protected int |
getArrayLength(E[] array)
Get the length of the given array.
|
E[] |
read(ByteReader reader)
Read a value from the given input.
|
void |
skip(ByteReader reader)
Read and discard a value from the given input.
|
void |
write(ByteWriter writer,
E[] array)
Write a value to the given output.
|
compare, convert, equals, fromParseableString, getDimensions, hashCode, toParseableString
validate
fromString, genericizeForIndex, getDefaultValue, getDefaultValueObject, getEncodingSignature, getKeyRange, getName, getTypeToken, hasPrefix0x00, hasPrefix0xff, toString, toString, validateAndWrite
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public E[] read(ByteReader reader)
FieldType
public void write(ByteWriter writer, E[] array)
FieldType
public void skip(ByteReader reader)
FieldType
protected int getArrayLength(E[] array)
ArrayType
getArrayLength
in class ArrayType<E[],E>
array
- non-null arrayprotected E getArrayElement(E[] array, int index)
ArrayType
getArrayElement
in class ArrayType<E[],E>
array
- non-null arrayindex
- index of target element in array
index
Copyright © 2022. All rights reserved.