Class InvertedHashSet<E>

  • All Implemented Interfaces:
    Serializable, Cloneable, Iterable<E>, Collection<E>, Set<E>

    public class InvertedHashSet<E>
    extends HashSet<E>
    implements Set<E>
    Negated Set: contains(x) returns true only if x has not been add()ed to the inverted set previously. Useful to supply where a method expects a whitelist "set", but one has a blacklist of values instead. (or vv)
    See Also:
    Serialized Form