Interface ICountMap<K>

Type Parameters:
K - Key
All Superinterfaces:
Iterable<ICountMapEntry<K>>
All Known Implementing Classes:
CountMap

public interface ICountMap<K> extends Iterable<ICountMapEntry<K>>
CountMap 接口 用来约束
Version:
0.0.1
Author:
scx567888
  • Method Details

    • add

      long add(K key, long count)
      添加
      Parameters:
      key - key
      count - count
      Returns:
      添加后的数量
    • set

      Long set(K key, long count)
      覆盖
      Parameters:
      key - key
      count - count
      Returns:
      之前的数量 (可为空)
    • get

      Long get(K key)
      获取
      Parameters:
      key - key
      Returns:
      数量 (可为空)
    • containsKey

      boolean containsKey(K key)
    • remove

      Long remove(K key)
      移除
      Parameters:
      key - key
      Returns:
      之前的数量 (可为空)
    • keys

      Set<K> keys()
    • size

      long size()
    • isEmpty

      boolean isEmpty()
    • clear

      void clear()
    • toMap

      Map<K,Long> toMap()
    • toMap

      Map<K,Long> toMap(Supplier<Map<K,Long>> mapSupplier)
    • forEach

      <E extends Throwable> void forEach(ScxObjLongConsumer<? super K, E> action) throws E
      Throws:
      E