com.google.protobuf

## Interface Internal.ProtobufList<E>

- All Superinterfaces:
    java.util.Collection<E>, java.lang.Iterable<E>, java.util.List<E>, java.util.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 java.util.List<E>, java.util.RandomAccess

  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

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isModifiable()` Returns whether this list can be modified via the publicly accessible `List` methods.
    `void` | `makeImmutable()` Makes this list immutable.
    `Internal.ProtobufList<E>` | `mutableCopyWithCapacity(int capacity)` Returns a mutable clone of this list with the specified capacity.

    - ### Methods inherited from interface java.util.List

      `add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray`

- - ### Method Detail

    - #### makeImmutable

          void makeImmutable()

      Makes this list immutable. All subsequent modifications will throw an `UnsupportedOperationException`.

    - #### isModifiable

          boolean isModifiable()

      Returns whether this list can be modified via the publicly accessible `List` methods.

    - #### mutableCopyWithCapacity

          Internal.ProtobufList<E> mutableCopyWithCapacity(int capacity)

      Returns a mutable clone of this list with the specified capacity.