Class MultiMapDecorator<TK,​TV,​TC extends Collection<TV>>

    • Constructor Detail

      • MultiMapDecorator

        public MultiMapDecorator​(@NotNull
                                 Map<TK,​TC> map)
    • Method Detail

      • add

        public void add​(TK key,
                        TV value)
      • addEmpty

        public void addEmpty​(TK key)
      • containsKey

        public boolean containsKey​(TK key)
      • clear

        public void clear()
      • keySet

        @NotNull
        public Set<TK> keySet()
      • size

        public int size()
      • valuesSize

        public int valuesSize()
        Returns:
        count of values in the multi-map
        Since:
        8.1
      • isEmpty

        public boolean isEmpty()
      • removeKey

        @Nullable
        public TC removeKey​(TK key)
      • removeValue

        public void removeValue​(TV v)
      • remove

        public void remove​(TK key,
                           TV v)
        Parameters:
        key - key
        v - value
        Since:
        10.0
      • removeAll

        public void removeAll​(TK key,
                              Collection<TV> values)
        Removes the specified values from the collection associated with the given key, if the key exists in the multimap.
        Parameters:
        key - the key identifying the collection to remove values from
        values - the values to be removed from the collection
        Since:
        2024.03
      • addAll

        public void addAll​(TK key,
                           @NotNull
                           Collection<? extends TV> values)
      • createEmptyCollection

        @NotNull
        protected abstract TC createEmptyCollection()