Package org.apache.sis.feature.builder
Class RemoveOnlyList<E extends TypeBuilder>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
org.apache.sis.feature.builder.RemoveOnlyList<E>
- All Implemented Interfaces:
Iterable<E>,Collection<E>,List<E>
Wraps another list in a new list allowing only read and remove operations.
Addition of new values are not allowed through this
RemoveOnlyList.- Since:
- 0.8
- Version:
- 0.8
-
Field Summary
FieldsFields inherited from class java.util.AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionRemoveOnlyList(List<E> elements) Creates a new list wrapping the given list. -
Method Summary
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, set, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, streamMethods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
Field Details
-
elements
The original list to wrap.
-
-
Constructor Details
-
RemoveOnlyList
Creates a new list wrapping the given list.
-
-
Method Details
-
size
public int size()Returns the number of elements in this list.- Specified by:
sizein interfaceCollection<E extends TypeBuilder>- Specified by:
sizein interfaceList<E extends TypeBuilder>- Specified by:
sizein classAbstractCollection<E extends TypeBuilder>
-
get
Returns the element at the given index.- Specified by:
getin interfaceList<E extends TypeBuilder>- Specified by:
getin classAbstractList<E extends TypeBuilder>
-
remove
Removes the element at the given index. The removed element is flagged as not usable anymore.- Specified by:
removein interfaceList<E extends TypeBuilder>- Overrides:
removein classAbstractList<E extends TypeBuilder>
-