Class MapBackedSet

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

    public final class MapBackedSet
    extends Object
    implements Set, Serializable
    Commons Collections 3 is in maintenance mode. Commons Collections 4 should be used instead.
    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.

    Commons Collections 3.1
    See Also:
    Serialized Form