Package com.google.protobuf
Class ProtobufArrayList<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
com.google.protobuf.AbstractProtobufList<E>
com.google.protobuf.ProtobufArrayList<E>
- All Implemented Interfaces:
Internal.ProtobufList<E>
,Iterable<E>
,Collection<E>
,List<E>
,RandomAccess
,SequencedCollection<E>
Implements
Internal.ProtobufList
for non-primitive and String
types.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate E[]
private static final ProtobufArrayList
<Object> private int
Fields inherited from class com.google.protobuf.AbstractProtobufList
DEFAULT_CAPACITY
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
private static <E> E[]
createArray
(int capacity) static <E> ProtobufArrayList
<E> private void
ensureIndexInRange
(int index) get
(int index) private String
makeOutOfBoundsExceptionMessage
(int index) mutableCopyWithCapacity
(int capacity) Returns a mutable clone of this list with the specified capacity.remove
(int index) int
size()
Methods inherited from class com.google.protobuf.AbstractProtobufList
addAll, addAll, clear, ensureIsMutable, equals, hashCode, isModifiable, makeImmutable, remove, removeAll, retainAll
Methods inherited from class java.util.AbstractList
indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList
Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
addFirst, addLast, contains, containsAll, getFirst, getLast, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, removeFirst, removeLast, replaceAll, reversed, sort, spliterator, subList, toArray, toArray
-
Field Details
-
EMPTY_LIST
-
array
-
size
private int size
-
-
Constructor Details
-
ProtobufArrayList
ProtobufArrayList() -
ProtobufArrayList
-
-
Method Details
-
emptyList
-
mutableCopyWithCapacity
Description copied from interface:Internal.ProtobufList
Returns a mutable clone of this list with the specified capacity.- Specified by:
mutableCopyWithCapacity
in interfaceInternal.ProtobufList<E>
-
add
- Specified by:
add
in interfaceCollection<E>
- Specified by:
add
in interfaceList<E>
- Overrides:
add
in classAbstractProtobufList<E>
-
add
-
get
-
remove
-
set
-
size
public int size()- Specified by:
size
in interfaceCollection<E>
- Specified by:
size
in interfaceList<E>
- Specified by:
size
in classAbstractCollection<E>
-
createArray
private static <E> E[] createArray(int capacity) -
ensureIndexInRange
private void ensureIndexInRange(int index) -
makeOutOfBoundsExceptionMessage
-