Class ListWithoutItemAtIndex<T>

  • Type Parameters:
    T - Type of the list items.
    All Implemented Interfaces:
    Iterable<T>, Collection<T>, List<T>

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

      • 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.