public enum Text extends Enum<Text> implements TitanPredicate
TitanPredicate.Converter
Enum Constant and Description |
---|
CONTAINS
Whether the text contains a given term as a token in the text (case insensitive)
|
CONTAINS_PREFIX
Whether the text contains a token that starts with a given term (case insensitive)
|
CONTAINS_REGEX
Whether the text contains a token that matches a regular expression
|
PREFIX
Whether the text starts with a given prefix (case sensitive)
|
REGEX
Whether the text matches a regular expression (case sensitive)
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNegation()
Whether this predicate has a predicate that is semantically its negation.
|
boolean |
isQNF()
Returns true if this predicate is in query normal form.
|
boolean |
isValidValueType(Class<?> clazz)
Whether the given class is a valid data type for a value to which this predicate may be applied.
|
TitanPredicate |
negate()
Returns the negation of this predicate if it exists, otherwise an exception is thrown.
|
void |
preevaluate(Object value,
Object condition) |
static <V> org.apache.tinkerpop.gremlin.process.traversal.P<V> |
textContains(V value) |
static <V> org.apache.tinkerpop.gremlin.process.traversal.P<V> |
textContainsPrefix(V value) |
static <V> org.apache.tinkerpop.gremlin.process.traversal.P<V> |
textContainsRegex(V value) |
static <V> org.apache.tinkerpop.gremlin.process.traversal.P<V> |
textPrefix(V value) |
static <V> org.apache.tinkerpop.gremlin.process.traversal.P<V> |
textRegex(V value) |
static List<String> |
tokenize(String str) |
static Text |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Text[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
isValidCondition, test
and, or
public static final Text CONTAINS
public static final Text CONTAINS_PREFIX
public static final Text CONTAINS_REGEX
public static final Text PREFIX
public static final Text REGEX
public static Text[] values()
for (Text c : Text.values()) System.out.println(c);
public static Text 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 boolean isValidValueType(Class<?> clazz)
TitanPredicate
Cmp.GREATER_THAN
can only be applied to Comparable
values.isValidValueType
in interface TitanPredicate
public boolean hasNegation()
TitanPredicate
Cmp.EQUAL
and Cmp.NOT_EQUAL
are negatives of each other.hasNegation
in interface TitanPredicate
public TitanPredicate negate()
TitanPredicate
TitanPredicate.hasNegation()
first.negate
in interface TitanPredicate
negate
in interface java.util.function.BiPredicate<Object,Object>
public boolean isQNF()
TitanPredicate
isQNF
in interface TitanPredicate
public static <V> org.apache.tinkerpop.gremlin.process.traversal.P<V> textContains(V value)
public static <V> org.apache.tinkerpop.gremlin.process.traversal.P<V> textContainsPrefix(V value)
public static <V> org.apache.tinkerpop.gremlin.process.traversal.P<V> textContainsRegex(V value)
public static <V> org.apache.tinkerpop.gremlin.process.traversal.P<V> textPrefix(V value)
public static <V> org.apache.tinkerpop.gremlin.process.traversal.P<V> textRegex(V value)
Copyright © 2012–2015. All rights reserved.