Class DeepImmutableList<E>

java.lang.Object
java.util.AbstractCollection<E>
de.cronn.reflection.util.immutable.collection.DeepImmutableCollection<E>
de.cronn.reflection.util.immutable.collection.DeepImmutableList<E>
All Implemented Interfaces:
Immutable, Serializable, Iterable<E>, Collection<E>, List<E>, SequencedCollection<E>

public class DeepImmutableList<E> extends DeepImmutableCollection<E> implements List<E>
See Also:
  • Constructor Details

    • DeepImmutableList

      public DeepImmutableList(List<E> list)
  • Method Details

    • of

      public static <T> DeepImmutableList<T> of(T elements)
    • of

      public static <T> DeepImmutableList<T> of(T e1, T e2)
    • of

      public static <T> DeepImmutableList<T> of(T e1, T e2, T e3)
    • get

      public E get(int index)
      Specified by:
      get in interface List<E>
    • indexOf

      public int indexOf(Object o)
      Specified by:
      indexOf in interface List<E>
    • lastIndexOf

      public int lastIndexOf(Object o)
      Specified by:
      lastIndexOf in interface List<E>
    • listIterator

      @NotNull public @NotNull ListIterator<E> listIterator()
      Specified by:
      listIterator in interface List<E>
    • listIterator

      @NotNull public @NotNull ListIterator<E> listIterator(int index)
      Specified by:
      listIterator in interface List<E>
    • subList

      @NotNull public @NotNull List<E> subList(int fromIndex, int toIndex)
      Specified by:
      subList in interface List<E>
    • set

      public E set(int index, E element)
      Specified by:
      set in interface List<E>
    • add

      public void add(int index, E element)
      Specified by:
      add in interface List<E>
    • remove

      public E remove(int index)
      Specified by:
      remove in interface List<E>
    • addAll

      public boolean addAll(int index, @NotNull @NotNull Collection<? extends E> c)
      Specified by:
      addAll in interface List<E>
    • sort

      public void sort(Comparator<? super E> c)
      Specified by:
      sort in interface List<E>