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>

public final class ListWithoutItemAtIndex<T> extends AbstractList<T> implements Serializable
A read-only list that excludes a specific item at a given index from another list.
Since:
8.4.0
See Also:
  • Constructor Details

    • ListWithoutItemAtIndex

      public ListWithoutItemAtIndex(List<? extends T> list, int toExclude)
      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