static enum Weighers.SingletonEntryWeigher extends Enum<Weighers.SingletonEntryWeigher> implements EntryWeigher<Object,Object>
| Enum Constant and Description |
|---|
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
static Weighers.SingletonEntryWeigher |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Weighers.SingletonEntryWeigher[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
int |
weightOf(Object key,
Object value)
Measures an entry's weight to determine how many units of capacity that
the key and value consumes.
|
public static final Weighers.SingletonEntryWeigher INSTANCE
public static Weighers.SingletonEntryWeigher[] values()
for (Weighers.SingletonEntryWeigher c : Weighers.SingletonEntryWeigher.values()) System.out.println(c);
public static Weighers.SingletonEntryWeigher valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic int weightOf(Object key,
Object value)
EntryWeigherweightOf in interface EntryWeigher<Object,Object>key - the key to weighvalue - the value to weighCopyright © 2010-2020 Toolsverse. All Rights Reserved.