Class ListWithoutItemAtIndex<T>
java.lang.Object
java.util.AbstractCollection<T>
java.util.AbstractList<T>
de.xima.fc.common.collection.ListWithoutItemAtIndex<T>
- Type Parameters:
T- Type of the list items.
- All Implemented Interfaces:
Serializable, Iterable<T>, Collection<T>, List<T>
A read-only list that excludes a specific item at a given index from another list.
- Since:
- 8.4.0
- See Also:
-
Field Summary
Fields inherited from class AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionListWithoutItemAtIndex(List<? extends T> list, int toExclude) Constructs a new list that excludes the item at the specified index from the provided list. -
Method Summary
Methods inherited from class AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListMethods inherited from class AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface List
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
Constructor Details
-
ListWithoutItemAtIndex
Constructs a new list that excludes the item at the specified index from the provided list.- Parameters:
list- The original list from which an item will be excluded.toExclude- The index of the item to exclude from the list.- Throws:
ArrayIndexOutOfBoundsException- if the index to exclude is out of bounds.
-
-
Method Details
-
get
-
size
public int size()- Specified by:
sizein interfaceCollection<T>- Specified by:
sizein interfaceList<T>- Specified by:
sizein classAbstractCollection<T>
-