Class MapBackedSet<E,V>

Type Parameters:
E - the type of the elements in this set
V - the dummy value type in this map
All Implemented Interfaces:
Serializable, Iterable<E>, Collection<E>, Set<E>

public final class MapBackedSet<E,V> extends Object implements Set<E>, Serializable
Decorates a Map to obtain Set behavior.

This class is used to create a Set with the same properties as the key set of any map. Thus, a ReferenceSet can be created by wrapping a ReferenceMap in an instance of this class.

Most map implementation can be used to create a set by passing in dummy values. Exceptions include BidiMap implementations, as they require unique values.

See Also: