Enum Weighers.SetWeigher

java.lang.Object
java.lang.Enum<Weighers.SetWeigher>
com.googlecode.concurrentlinkedhashmap.Weighers.SetWeigher
All Implemented Interfaces:
Weigher<Set<?>>, Serializable, Comparable<Weighers.SetWeigher>
Enclosing class:
Weighers

static enum Weighers.SetWeigher extends Enum<Weighers.SetWeigher> implements Weigher<Set<?>>
  • Enum Constant Details

  • Constructor Details

    • SetWeigher

      private SetWeigher()
  • Method Details

    • values

      public static Weighers.SetWeigher[] 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.SetWeigher 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(Set<?> values)
      Description copied from interface: Weigher
      Measures an object's weight to determine how many units of capacity that the value consumes. A value must consume a minimum of one unit.
      Specified by:
      weightOf in interface Weigher<Set<?>>
      Parameters:
      values - the object to weigh
      Returns:
      the object's weight