Class MapBackedSet

  • All Implemented Interfaces:
    Serializable, Iterable, Collection, Set

    public final class MapBackedSet
    extends Object
    implements Set, 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:
    Commons Collections 3.1
    Version:
    $Revision: 646777 $ $Date: 2008-04-10 14:33:15 +0200 (Thu, 10 Apr 2008) $
    Author:
    Stephen Colebourne
    See Also:
    Serialized Form