Interface IMultiMap<K,V>

All Superinterfaces:
Iterable<IMultiMapEntry<K,V>>
All Known Implementing Classes:
MultiMap

public interface IMultiMap<K,V> extends Iterable<IMultiMapEntry<K,V>>
IMultiMap
Version:
0.0.1
Author:
scx567888
  • Method Details

    • add

      boolean add(K key, V value)
    • add

      boolean add(K key, V... values)
    • add

      boolean add(K key, Collection<? extends V> values)
    • add

      void add(Map<? extends K, ? extends V> map)
    • add

      void add(IMultiMap<? extends K, ? extends V> map)
    • set

      List<V> set(K key, V value)
    • set

      List<V> set(K key, V... values)
    • set

      List<V> set(K key, Collection<? extends V> values)
    • set

      void set(Map<? extends K, ? extends V> map)
    • set

      void set(IMultiMap<? extends K, ? extends V> map)
    • get

      V get(K key)
      获取首个值
    • getAll

      List<V> getAll(K key)
      获取所有值
    • containsKey

      boolean containsKey(K key)
    • containsValue

      boolean containsValue(V value)
    • remove

      boolean remove(K key, V value)
    • remove

      boolean remove(K key, V... values)
    • remove

      boolean remove(K key, Collection<? extends V> values)
    • removeAll

      List<V> removeAll(K key)
    • keys

      Set<K> keys()
    • values

      List<V> values()
      返回 MultiMap 中所有值的扁平集合 (所有键对应的 values 合并成一个列表)
    • size

      long size()
      返回 MultiMap 中所有键对应的所有值的总数量 (即所有 values 的扁平总和)
    • isEmpty

      boolean isEmpty()
    • clear

      void clear()
    • toMultiValueMap

      Map<K,List<V>> toMultiValueMap()
    • toSingleValueMap

      Map<K,V> toSingleValueMap()
    • toSingleValueMap

      Map<K,V> toSingleValueMap(Supplier<Map<K,V>> mapSupplier)
    • forEach

      <E extends Throwable> void forEach(cool.scx.functional.ScxBiConsumer<? super K, V, E> action) throws E
      Throws:
      E
    • forEachEntry

      <E extends Throwable> void forEachEntry(cool.scx.functional.ScxBiConsumer<? super K, List<V>, E> action) throws E
      Throws:
      E