Class DeepImmutableCollection<E>

java.lang.Object
java.util.AbstractCollection<E>
de.cronn.reflection.util.immutable.collection.DeepImmutableCollection<E>
All Implemented Interfaces:
Immutable, java.io.Serializable, java.lang.Iterable<E>, java.util.Collection<E>
Direct Known Subclasses:
DeepImmutableList, DeepImmutableSet

public class DeepImmutableCollection<E>
extends java.util.AbstractCollection<E>
implements java.util.Collection<E>, Immutable, java.io.Serializable
See Also:
Serialized Form
  • Constructor Summary

    Constructors 
    Constructor Description
    DeepImmutableCollection​(java.util.Collection<E> delegate)  
  • Method Summary

    Modifier and Type Method Description
    boolean add​(E t)  
    boolean addAll​(java.util.Collection<? extends E> c)  
    void clear()  
    boolean contains​(java.lang.Object o)  
    boolean containsAll​(java.util.Collection<?> c)  
    boolean equals​(java.lang.Object o)  
    int hashCode()  
    boolean isEmpty()  
    java.util.Iterator<E> iterator()  
    boolean remove​(java.lang.Object o)  
    boolean removeAll​(java.util.Collection<?> c)  
    boolean retainAll​(java.util.Collection<?> c)  
    int 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, spliterator, stream, toArray, toArray, toArray

    Methods inherited from interface java.lang.Iterable

    forEach
  • Constructor Details

  • Method Details

    • size

      public int size()
      Specified by:
      size in interface java.util.Collection<E>
      Specified by:
      size in class java.util.AbstractCollection<E>
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface java.util.Collection<E>
      Overrides:
      isEmpty in class java.util.AbstractCollection<E>
    • contains

      public boolean contains​(java.lang.Object o)
      Specified by:
      contains in interface java.util.Collection<E>
      Overrides:
      contains in class java.util.AbstractCollection<E>
    • iterator

      @Nonnull public java.util.Iterator<E> iterator()
      Specified by:
      iterator in interface java.util.Collection<E>
      Specified by:
      iterator in interface java.lang.Iterable<E>
      Specified by:
      iterator in class java.util.AbstractCollection<E>
    • containsAll

      public boolean containsAll​(@Nonnull java.util.Collection<?> c)
      Specified by:
      containsAll in interface java.util.Collection<E>
      Overrides:
      containsAll in class java.util.AbstractCollection<E>
    • equals

      public boolean equals​(java.lang.Object o)
      Specified by:
      equals in interface java.util.Collection<E>
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface java.util.Collection<E>
      Overrides:
      hashCode in class java.lang.Object
    • add

      public boolean add​(E t)
      Specified by:
      add in interface java.util.Collection<E>
      Overrides:
      add in class java.util.AbstractCollection<E>
    • remove

      public boolean remove​(java.lang.Object o)
      Specified by:
      remove in interface java.util.Collection<E>
      Overrides:
      remove in class java.util.AbstractCollection<E>
    • addAll

      public boolean addAll​(@Nonnull java.util.Collection<? extends E> c)
      Specified by:
      addAll in interface java.util.Collection<E>
      Overrides:
      addAll in class java.util.AbstractCollection<E>
    • removeAll

      public boolean removeAll​(@Nonnull java.util.Collection<?> c)
      Specified by:
      removeAll in interface java.util.Collection<E>
      Overrides:
      removeAll in class java.util.AbstractCollection<E>
    • retainAll

      public boolean retainAll​(@Nonnull java.util.Collection<?> c)
      Specified by:
      retainAll in interface java.util.Collection<E>
      Overrides:
      retainAll in class java.util.AbstractCollection<E>
    • clear

      public void clear()
      Specified by:
      clear in interface java.util.Collection<E>
      Overrides:
      clear in class java.util.AbstractCollection<E>