Interface ICountMap<K>

Type Parameters:
K - Key
All Superinterfaces:
Iterable<Map.Entry<K,Long>>
All Known Implementing Classes:
CountMap

public interface ICountMap<K> extends Iterable<Map.Entry<K,Long>>
CountMap 接口 用来约束
Version:
0.0.1
Author:
scx567888
  • Method Details

    • add

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

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

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

      Long remove(K key)
      set
      Parameters:
      key - key
      Returns:
      之前的数量 (可为空)
    • size

      long size()
    • isEmpty

      boolean isEmpty()
    • clear

      void clear()
    • keys

      Set<K> keys()
    • toMap

      Map<K,Long> toMap()
    • toMap

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