Class IdentityArraySet<E extends @UnknownSignedness Object>

java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<E>
org.plumelib.util.IdentityArraySet<E>
Type Parameters:
E - the type of the set elements
All Implemented Interfaces:
Iterable<E>, Collection<E>, Set<E>

public class IdentityArraySet<E extends @UnknownSignedness Object> extends AbstractSet<E>
A set backed by an array. It uses object identity (==) for comparison. It permits null values and its iterator has deterministic ordering.

Compared to a set built on IdentityHashMap: For very small sets, this uses much less space, has comparable performance, and (like a LinkedHashSet) is deterministic, with elements returned in the order they were inserted. For large sets, this is significantly less performant than other set implementations.