Enum Weighers.SingletonEntryWeigher

java.lang.Object
java.lang.Enum<Weighers.SingletonEntryWeigher>
com.googlecode.concurrentlinkedhashmap.Weighers.SingletonEntryWeigher
All Implemented Interfaces:
EntryWeigher<Object,Object>, Serializable, Comparable<Weighers.SingletonEntryWeigher>
Enclosing class:
Weighers

static enum Weighers.SingletonEntryWeigher extends Enum<Weighers.SingletonEntryWeigher> implements EntryWeigher<Object,Object>
  • Enum Constant Details

  • Constructor Details

    • SingletonEntryWeigher

      private SingletonEntryWeigher()
  • Method Details

    • values

      public static Weighers.SingletonEntryWeigher[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Weighers.SingletonEntryWeigher valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • weightOf

      public int weightOf(Object key, Object 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<Object,Object>
      Parameters:
      key - the key to weigh
      value - the value to weigh
      Returns:
      the entry's weight