Package ghidra.util
Class DistinctIterator<T>
java.lang.Object
generic.util.AbstractPeekableIterator<T>
ghidra.util.DistinctIterator<T>
- Type Parameters:
T- the type of elements
- All Implemented Interfaces:
PeekableIterator<T>,Iterator<T>
A filtering iterator which removes repeated objects
This iterator only removes immediate repeats (similar to the uniq command on UNIX). To obtain a truly distinct iteration, the wrapped iterator must visit elements in sorted order.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected Tprotected final PeekableIterator<T> Fields inherited from class generic.util.AbstractPeekableIterator
next, soughtNext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected TseekNext()Find the next element in this iterator, because the client called eitherAbstractPeekableIterator.nextorAbstractPeekableIterator.peek().Methods inherited from class generic.util.AbstractPeekableIterator
hasNext, next, peekMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Field Details
-
first
protected boolean first -
last
-
wrapped
-
-
Constructor Details
-
DistinctIterator
-
-
Method Details
-
seekNext
Description copied from class:AbstractPeekableIteratorFind the next element in this iterator, because the client called eitherAbstractPeekableIterator.nextorAbstractPeekableIterator.peek().- Specified by:
seekNextin classAbstractPeekableIterator<T>- Returns:
- the next element
-