Class UnionCollectionView<E>

  • All Implemented Interfaces:
    java.lang.Iterable<E>, java.util.Collection<E>

    public final class UnionCollectionView<E>
    extends AbstractUnmodifiableCollection<E>
    Mathias Hofer
    • Constructor Summary

      Constructor Description
      UnionCollectionView​(java.util.Collection<? extends E> c1, java.util.Collection<? extends E> c2)  
    • Method Summary

      Modifier and Type Method Description
      boolean contains​(java.lang.Object o)  
      boolean isEmpty()  
      java.util.Iterator<E> iterator()  
      static <E,​T extends E>
      of​(java.util.Collection<? extends E> c, T elem)  
      int size()  
      • Methods inherited from class java.util.AbstractCollection

        containsAll, toArray, toArray, toString
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        equals, hashCode, parallelStream, spliterator, stream, toArray
      • Methods inherited from interface java.lang.Iterable

    • Constructor Detail

      • UnionCollectionView

        public UnionCollectionView​(java.util.Collection<? extends E> c1,
                                   java.util.Collection<? extends E> c2)
    • Method Detail

      • of

        public static <E,​T extends E> java.util.Collection<E> of​(java.util.Collection<? extends E> c,
                                                                       T elem)
      • iterator

        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>
      • 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>
        isEmpty in class java.util.AbstractCollection<E>
      • contains

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