Class UniqIterator<T>

java.lang.Object
fr.lirmm.graphik.util.stream.UniqIterator<T>
Type Parameters:
T - the iterated element type
All Implemented Interfaces:
CloseableIterator<T>, Closeable, AutoCloseable

public class UniqIterator<T> extends Object implements CloseableIterator<T>
Remove adjacent equals elements.
  • Constructor Details

    • UniqIterator

      public UniqIterator(Iterator<T> it)
      Creates an iterator removing adjacent duplicates from a standard iterator.
      Parameters:
      it - the iterator to filter
    • UniqIterator

      public UniqIterator(CloseableIterator<T> it)
      Creates an iterator removing adjacent duplicates from a closeable iterator.
      Parameters:
      it - the iterator to filter
  • Method Details