Class AbstractSetValuedMap<K,​V>

  • Type Parameters:
    K - the type of the keys in this map
    V - the type of the values in this map
    All Implemented Interfaces:
    MultiValuedMap<K,​V>, SetValuedMap<K,​V>
    Direct Known Subclasses:
    HashSetValuedHashMap

    public abstract class AbstractSetValuedMap<K,​V>
    extends AbstractMultiValuedMap<K,​V>
    implements SetValuedMap<K,​V>
    Abstract implementation of the SetValuedMap interface to simplify the creation of subclass implementations.

    Subclasses specify a Map implementation to use as the internal storage and the Set implementation to use as values.

    Since:
    4.1
    • Constructor Detail

      • AbstractSetValuedMap

        protected AbstractSetValuedMap()
        Constructor needed for subclass serialisation.
      • AbstractSetValuedMap

        protected AbstractSetValuedMap​(Map<K,​? extends Set<V>> map)
        A constructor that wraps, not copies
        Parameters:
        map - the map to wrap, must not be null
        Throws:
        NullPointerException - if the map is null