Class MapBackedSet

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

    @Deprecated(since="2021-04-30")
    public final class MapBackedSet
    extends Object
    implements Set, Serializable
    Deprecated.
    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.

    Since:
    Commons Collections 3.1
    See Also:
    Serialized Form