public static interface Internal.ProtobufList<E> extends List<E>, 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.
Type Parameter |
|
---|---|
Name | Description |
E |
Methods
isModifiable()
public abstract boolean isModifiable()
Returns whether this list can be modified via the publicly accessible List methods.
Returns | |
---|---|
Type | Description |
boolean |
makeImmutable()
public abstract void makeImmutable()
Makes this list immutable. All subsequent modifications will throw an UnsupportedOperationException.
mutableCopyWithCapacity(int capacity)
public abstract Internal.ProtobufList<E> mutableCopyWithCapacity(int capacity)
Returns a mutable clone of this list with the specified capacity.
Parameter | |
---|---|
Name | Description |
capacity |
int |
Returns | |
---|---|
Type | Description |
ProtobufList<E> |