Interface CloseableIteratorSet<E>

  • All Superinterfaces:
    CloseableIteratorCollection<E>, java.util.Collection<E>, java.lang.Iterable<E>, java.util.Set<E>
    All Known Implementing Classes:
    CloseableIteratorSetAdapter

    public interface CloseableIteratorSet<E>
    extends java.util.Set<E>, CloseableIteratorCollection<E>
    A set that defines an iterator method that returns a CloseableIterator instead of a non closeable one. This is needed so that iterators can be properly cleaned up. All other methods will internally clean up any iterators created and don't have other side effects.
    Since:
    7.0
    Author:
    wburns
    • Method Detail

      • spliterator

        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>
        Specified by:
        spliterator in interface java.util.Set<E>