Class Weighers.EntryWeigherView<K,V>

java.lang.Object
com.googlecode.concurrentlinkedhashmap.Weighers.EntryWeigherView<K,V>
All Implemented Interfaces:
EntryWeigher<K,V>, Serializable
Enclosing class:
Weighers

static final class Weighers.EntryWeigherView<K,V> extends Object implements EntryWeigher<K,V>, Serializable
  • Field Details

  • Constructor Details

    • EntryWeigherView

      EntryWeigherView(Weigher<? super V> weigher)
  • Method Details

    • weightOf

      public int weightOf(K key, V value)
      Description copied from interface: EntryWeigher
      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.
      Specified by:
      weightOf in interface EntryWeigher<K,V>
      Parameters:
      key - the key to weigh
      value - the value to weigh
      Returns:
      the entry's weight