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, java.io.Serializable, java.lang.Iterable<E>, java.util.Collection<E>, java.util.List<E>

public class DeepImmutableList<E>
extends DeepImmutableCollection<E>
implements java.util.List<E>
See Also:
Serialized Form
  • Constructor Summary

    Constructors 
    Constructor Description
    DeepImmutableList​(java.util.List<E> list)  
  • Method Summary

    Modifier and Type Method Description
    void add​(int index, E element)  
    boolean addAll​(int index, java.util.Collection<? extends E> c)  
    E get​(int index)  
    int indexOf​(java.lang.Object o)  
    int lastIndexOf​(java.lang.Object o)  
    java.util.ListIterator<E> listIterator()  
    java.util.ListIterator<E> listIterator​(int index)  
    static <T> DeepImmutableList<T> of​(T elements)  
    static <T> DeepImmutableList<T> of​(T e1, T e2)  
    static <T> DeepImmutableList<T> of​(T e1, T e2, T e3)  
    E remove​(int index)  
    E set​(int index, E element)  
    void sort​(java.util.Comparator<? super E> c)  
    java.util.List<E> subList​(int fromIndex, int toIndex)  

    Methods inherited from class de.cronn.reflection.util.immutable.collection.DeepImmutableCollection

    add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size

    Methods inherited from class java.util.AbstractCollection

    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.lang.Iterable

    forEach

    Methods inherited from interface java.util.List

    add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, replaceAll, retainAll, size, spliterator, toArray, toArray
  • Constructor Details

  • 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 java.util.List<E>
    • indexOf

      public int indexOf​(java.lang.Object o)
      Specified by:
      indexOf in interface java.util.List<E>
    • lastIndexOf

      public int lastIndexOf​(java.lang.Object o)
      Specified by:
      lastIndexOf in interface java.util.List<E>
    • listIterator

      @Nonnull public java.util.ListIterator<E> listIterator()
      Specified by:
      listIterator in interface java.util.List<E>
    • listIterator

      @Nonnull public java.util.ListIterator<E> listIterator​(int index)
      Specified by:
      listIterator in interface java.util.List<E>
    • subList

      @Nonnull public java.util.List<E> subList​(int fromIndex, int toIndex)
      Specified by:
      subList in interface java.util.List<E>
    • set

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

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

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

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

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