public enum T extends java.lang.Enum<T> implements java.util.function.Function<Element,java.lang.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 java.lang.Object |
apply(Element element) |
static T |
fromString(java.lang.String accessor) |
abstract java.lang.String |
getAccessor() |
static T |
valueOf(java.lang.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(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic abstract java.lang.String getAccessor()
public abstract java.lang.Object apply(Element element)
apply in interface java.util.function.Function<Element,java.lang.Object>public static T fromString(java.lang.String accessor)
Copyright © 2013-2015 TinkerPop. All Rights Reserved.