Interface ValueWeigher.EntryWeigher<K,V>

Type Parameters:
K - the key type | 键类型
V - the value type | 值类型
Enclosing interface:
ValueWeigher<V>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface ValueWeigher.EntryWeigher<K,V>
Entry weigher interface for key-value pairs 键值对的条目权重计算器接口
Since:
JDK 25, opencode-base-cache V1.0.0
Author:
Leon Soo www.LeonSoo.com
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    weigh(K key, V value)
    Calculate the weight of a key-value pair 计算键值对的权重
  • Method Details

    • weigh

      long weigh(K key, V value)
      Calculate the weight of a key-value pair 计算键值对的权重
      Parameters:
      key - the key | 键
      value - the value | 值
      Returns:
      the combined weight | 组合权重