public enum T extends Enum<T> implements Function<Element,Object>
Function can be used to map an element to its token value.
 For example, T.id.apply(element).| Enum Constant and Description | 
|---|
id
Id (representing Element.id()) 
 | 
key
Key (representing Property.key()) 
 | 
label
Label (representing Element.label()) 
 | 
value
Value (representing Property.value()) 
 | 
| Modifier and Type | Method and Description | 
|---|---|
abstract Object | 
apply(Element element)  | 
static T | 
fromString(String accessor)  | 
abstract String | 
getAccessor()  | 
static T | 
valueOf(String name)
Returns the enum constant of this type with the specified name. 
 | 
static T[] | 
values()
Returns an array containing the constants of this enum type, in
the order they are declared. 
 | 
public static final T label
public static final T id
public static final T key
public static final T value
public static T[] values()
for (T c : T.values()) System.out.println(c);
public static T 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 abstract String getAccessor()
Copyright © 2013–2021 Apache Software Foundation. All rights reserved.