Package com.google.protobuf
Interface Internal.ProtobufList<E>
-
- All Superinterfaces:
Collection<E>,Iterable<E>,List<E>,RandomAccess
- All Known Subinterfaces:
Internal.BooleanList,Internal.DoubleList,Internal.FloatList,Internal.IntList,Internal.LongList
- All Known Implementing Classes:
LazyStringArrayList
- Enclosing class:
- Internal
public static interface Internal.ProtobufList<E> extends List<E>, RandomAccess
ExtendsListto add the capability to make the list immutable and inspect if it is modifiable.All implementations must support efficient random access.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisModifiable()Returns whether this list can be modified via the publicly accessibleListmethods.voidmakeImmutable()Makes this list immutable.Internal.ProtobufList<E>mutableCopyWithCapacity(int capacity)Returns a mutable clone of this list with the specified capacity.
-
-
-
Method Detail
-
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 accessibleListmethods.
-
mutableCopyWithCapacity
Internal.ProtobufList<E> mutableCopyWithCapacity(int capacity)
Returns a mutable clone of this list with the specified capacity.
-
-