Class DistinctIteration<E>

    • Constructor Detail

      • DistinctIteration

        @Deprecated
        public DistinctIteration​(CloseableIteration<? extends E> iter)
        Deprecated.
        Creates a new DistinctIterator.
        Parameters:
        iter - The underlying iterator.
      • DistinctIteration

        public DistinctIteration​(CloseableIteration<? extends E> iter,
                                 Set<E> excludeSet)
        Creates a new DistinctIterator.
        Parameters:
        Set - a hopefully optimized set
        iter - The underlying iterator.
      • DistinctIteration

        public DistinctIteration​(CloseableIteration<? extends E> iter,
                                 Supplier<Set<E>> setMaker)
        Creates a new DistinctIterator.
        Parameters:
        Supplier - > a supplier of a hopefully optimized set
        iter - The underlying iterator.
    • Method Detail

      • accept

        protected boolean accept​(E object)
        Returns true if the specified object hasn't been seen before.
        Specified by:
        accept in class FilterIteration<E>
        Parameters:
        object - The object to be tested.
        Returns:
        true if the object should be returned, false otherwise.
      • add

        protected boolean add​(E object)
        Parameters:
        object - to put into the set