Class CloseableIteratorCollectionAdapter<E>

    • Field Detail

      • delegate

        protected final java.util.Collection<E> delegate
    • Constructor Detail

      • CloseableIteratorCollectionAdapter

        public CloseableIteratorCollectionAdapter​(java.util.Collection<E> delegate)
    • Method Detail

      • size

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

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

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

        public CloseableIterator<E> iterator()
        Description copied from interface: CloseableIteratorCollection

        This iterator should be explicitly closed when iteration upon it is completed. Failure to do so could cause resources to not be freed properly

        Specified by:
        iterator in interface CloseableIteratorCollection<E>
        Specified by:
        iterator in interface java.util.Collection<E>
        Specified by:
        iterator in interface java.lang.Iterable<E>
      • spliterator

        public CloseableSpliterator<E> spliterator()
        Description copied from interface: CloseableIteratorCollection

        This spliterator should be explicitly closed after it has been used. Failure to do so could cause resources to not be freed properly

        Specified by:
        spliterator in interface CloseableIteratorCollection<E>
        Specified by:
        spliterator in interface java.util.Collection<E>
        Specified by:
        spliterator in interface java.lang.Iterable<E>
      • toArray

        public java.lang.Object[] toArray()
        Specified by:
        toArray in interface java.util.Collection<E>
      • toArray

        public <T> T[] toArray​(T[] a)
        Specified by:
        toArray in interface java.util.Collection<E>
      • add

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

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

        public boolean containsAll​(java.util.Collection<?> c)
        Specified by:
        containsAll in interface java.util.Collection<E>
      • addAll

        public boolean addAll​(java.util.Collection<? extends E> c)
        Specified by:
        addAll in interface java.util.Collection<E>
      • retainAll

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

        public boolean removeAll​(java.util.Collection<?> c)
        Specified by:
        removeAll in interface java.util.Collection<E>
      • clear

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