Interface EntryWeigher<K,​V>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int weightOf​(K key, V value)
      Measures an entry's weight to determine how many units of capacity that the key and value consumes.
    • Method Detail

      • weightOf

        int weightOf​(K key,
                     V value)
        Measures an entry's weight to determine how many units of capacity that the key and value consumes. An entry must consume a minimum of one unit.
        Parameters:
        key - the key to weigh
        value - the value to weigh
        Returns:
        the entry's weight