public final class RepeatedEnum<E extends ProtoEnum> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
length |
| Modifier and Type | Method and Description |
|---|---|
RepeatedEnum<E> |
add(E value) |
RepeatedEnum<E> |
addAll(E... values) |
RepeatedEnum<E> |
addAll(E[] buffer,
int offset,
int length) |
void |
addAll(RepeatedEnum<E> values) |
RepeatedEnum<E> |
addAllValues(int... values) |
RepeatedEnum<E> |
addAllValues(int[] buffer,
int offset,
int length) |
int |
addLength(int length)
Sets the length to length + offset and returns
the previous length.
|
RepeatedEnum<E> |
addValue(int value) |
int[] |
array()
Provides access to the internal storage array.
|
int |
capacity() |
protected void |
checkIndex(int index) |
RepeatedType |
clear()
Sets the output length to zero and performs any
necessary cleanup of the content.
|
RepeatedEnum<E> |
copyFrom(E[] buffer) |
RepeatedEnum<E> |
copyFrom(E[] buffer,
int offset,
int length) |
void |
copyFrom(RepeatedEnum<E> other) |
RepeatedEnum<E> |
copyFromValues(int[] buffer) |
RepeatedEnum<E> |
copyFromValues(int[] buffer,
int offset,
int length) |
boolean |
equals(Object o) |
protected void |
extendCapacityTo(int desiredSize) |
E |
get(int index) |
int |
getValue(int index) |
protected E |
getValueAt(int index) |
int |
hashCode()
Repeated fields have no immutable state and should not
be used in hashing structures.
|
us.hebi.quickbuf.RepeatedField.GenericIterator |
iterator() |
int |
length() |
static <E extends ProtoEnum> |
newEmptyInstance(ProtoEnum.EnumConverter<E> converter) |
int |
remainingCapacity() |
RepeatedType |
reserve(int count)
Makes sure that the internal storage capacity has space for
at least the requested number of entries.
|
RepeatedEnum<E> |
set(int index,
E value) |
RepeatedEnum<E> |
setLength(int length)
Sets the absolute length of the data that can be serialized.
|
RepeatedEnum<E> |
setValue(int index,
int value) |
int[] |
toArray()
Creates a copy of the valid data contained in the
internal storage.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic static <E extends ProtoEnum> RepeatedEnum<E> newEmptyInstance(ProtoEnum.EnumConverter<E> converter)
protected E getValueAt(int index)
public E get(int index)
public RepeatedEnum<E> set(int index, E value)
public RepeatedEnum<E> add(E value)
public RepeatedEnum<E> addAll(E... values)
public RepeatedEnum<E> addAll(E[] buffer, int offset, int length)
public RepeatedEnum<E> copyFrom(E[] buffer)
public RepeatedEnum<E> copyFrom(E[] buffer, int offset, int length)
public void copyFrom(RepeatedEnum<E> other)
public void addAll(RepeatedEnum<E> values)
public int getValue(int index)
public RepeatedEnum<E> setValue(int index, int value)
public RepeatedEnum<E> addValue(int value)
public RepeatedEnum<E> addAllValues(int... values)
public RepeatedEnum<E> addAllValues(int[] buffer, int offset, int length)
public RepeatedEnum<E> copyFromValues(int[] buffer)
public RepeatedEnum<E> copyFromValues(int[] buffer, int offset, int length)
public int capacity()
public final int[] toArray()
public final int[] array()
The array may be larger than the amount of contained data, but the data is only valid between index 0 and length.
public final RepeatedEnum<E> setLength(int length)
This does not change the underlying data, so setting a length longer than the current one may result in arbitrary data being serialized.
length - desired lengthpublic final int addLength(int length)
See setLength(int)
length - added to the current lengthprotected void extendCapacityTo(int desiredSize)
public final int length()
public final int remainingCapacity()
public us.hebi.quickbuf.RepeatedField.GenericIterator iterator()
public final RepeatedType reserve(int count)
count - number of entries to be addedpublic RepeatedType clear()
protected final void checkIndex(int index)
Copyright © 2019–2024 HEBI Robotics. All rights reserved.