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>

public class DistinctIterator<T> extends AbstractPeekableIterator<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.