Class DistinctIteration<E,X extends Exception>

All Implemented Interfaces:
AutoCloseable, CloseableIteration<E,X>, Iteration<E,X>
Direct Known Subclasses:
LimitedSizeDistinctIteration

@Deprecated(since="4.1.0") public class DistinctIteration<E,X extends Exception> extends FilterIteration<E,X>
Deprecated.
An Iteration that filters any duplicate elements from an underlying iterator.
  • Constructor Details

    • DistinctIteration

      public DistinctIteration(Iteration<? extends E,? extends X> iter)
      Deprecated.
      Creates a new DistinctIterator.
      Parameters:
      iter - The underlying iterator.
    • DistinctIteration

      public DistinctIteration(Iteration<? extends E,? extends X> iter, Supplier<Set<E>> setMaker)
      Deprecated.
  • Method Details

    • accept

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

      protected boolean add(E object) throws X
      Deprecated.
      Parameters:
      object - to put into the set
      Throws:
      X
    • makeSet

      protected Set<E> makeSet()
      Deprecated.