Class MapBackedSet<E,V>

java.lang.Object
org.apache.commons.collections4.set.MapBackedSet<E,V>
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 behaviour.

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.

Since:
3.1
Version:
$Id: MapBackedSet.java 1686855 2015-06-22 13:00:27Z tn $
See Also: