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, subList
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods 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:
size
in interfaceCollection<E extends TypeBuilder>
- Specified by:
size
in interfaceList<E extends TypeBuilder>
- Specified by:
size
in classAbstractCollection<E extends TypeBuilder>
-
get
Returns the element at the given index.- Specified by:
get
in interfaceList<E extends TypeBuilder>
- Specified by:
get
in classAbstractList<E extends TypeBuilder>
-
remove
Removes the element at the given index. The removed element is flagged as not usable anymore.- Specified by:
remove
in interfaceList<E extends TypeBuilder>
- Overrides:
remove
in classAbstractList<E extends TypeBuilder>
-