public enum Contain extends Enum<Contain> implements JanusGraphPredicate
Enum Constant and Description |
---|
IN
Whether an element is in a collection
|
NOT_IN
Whether an element is not in a collection
|
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 |
isValidCondition(Object condition)
Whether the given condition is a valid condition for this predicate.
|
boolean |
isValidValueType(Class<?> clazz)
Whether the given class is a valid data type for a value to which this predicate may be applied.
|
static Contain |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Contain[] |
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
negate, test
getPredicateName
and, or
public static final Contain IN
public static final Contain NOT_IN
public static Contain[] values()
for (Contain c : Contain.values()) System.out.println(c);
public static Contain 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)
JanusGraphPredicate
For instance, the Cmp.GREATER_THAN
can only be applied to Comparable
values.
isValidValueType
in interface JanusGraphPredicate
public boolean isValidCondition(Object condition)
JanusGraphPredicate
For instance, the Cmp.GREATER_THAN
would require that the condition is comparable and not null.
isValidCondition
in interface JanusGraphPredicate
public boolean hasNegation()
JanusGraphPredicate
Cmp.EQUAL
and Cmp.NOT_EQUAL
are negatives of each other.hasNegation
in interface JanusGraphPredicate
public boolean isQNF()
JanusGraphPredicate
isQNF
in interface JanusGraphPredicate
Copyright © 2012–2024. All rights reserved.