Package com.google.protobuf
Interface Internal.ProtobufList<E>
- All Superinterfaces:
Collection<E>
,Iterable<E>
,List<E>
,RandomAccess
,SequencedCollection<E>
- All Known Subinterfaces:
Internal.BooleanList
,Internal.DoubleList
,Internal.FloatList
,Internal.IntList
,Internal.LongList
- All Known Implementing Classes:
LazyStringArrayList
- Enclosing class:
Internal
Extends
List
to add the capability to make the list immutable and inspect if it is
modifiable.
All implementations must support efficient random access.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether this list can be modified via the publicly accessibleList
methods.void
Makes this list immutable.mutableCopyWithCapacity
(int capacity) Returns a mutable clone of this list with the specified capacity.Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
add, add, addAll, addAll, addFirst, addLast, clear, contains, containsAll, equals, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, set, size, sort, spliterator, subList, toArray, toArray
-
Method Details
-
makeImmutable
void makeImmutable()Makes this list immutable. All subsequent modifications will throw anUnsupportedOperationException
. -
isModifiable
boolean isModifiable()Returns whether this list can be modified via the publicly accessibleList
methods. -
mutableCopyWithCapacity
Returns a mutable clone of this list with the specified capacity.
-