Package com.tonic.analysis.query.value
Enum Operator
- java.lang.Object
-
- java.lang.Enum<Operator>
-
- com.tonic.analysis.query.value.Operator
-
- All Implemented Interfaces:
Serializable,Comparable<Operator>
public enum Operator extends Enum<Operator>
The comparison and relation vocabulary of the query DSL.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CONTAINSSubstring or membership containment, depending on the operand kinds.ENDS_WITHString suffix test; false unless both operands are strings.EQEquality within a value kind - type names compared in canonical form, numbers compared as doubles across int and real, and two nulls equal.FLOWS_FROMData-flow reachability into the left operand from the right, evaluated over SSA rather than bytest(com.tonic.analysis.query.value.Value, com.tonic.analysis.query.value.Value), which always returns false for it.FLOWS_TOData-flow reachability from the left operand to the right, evaluated over SSA rather than bytest(com.tonic.analysis.query.value.Value, com.tonic.analysis.query.value.Value), which always returns false for it.GTStrictly greater than, numeric operands only; false for any other kind pairing.GTEGreater than or equal, numeric operands only; false for any other kind pairing.INSet membership; false unless the right operand is a set.LTStrictly less than, numeric operands only; false for any other kind pairing.LTELess than or equal, numeric operands only; false for any other kind pairing.MATCHESRegular-expression match of the left string against the right pattern.NEQNegation ofEQ, so two values of incomparable kinds are unequal.STARTS_WITHString prefix test; false unless both operands are strings.SUBTYPE_OFSubtype relation between two types, resolved by the query engine rather than bytest(com.tonic.analysis.query.value.Value, com.tonic.analysis.query.value.Value), which always returns false for it.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisRelational()Data-flow relations whose right operand is an accessor, evaluated over SSA (nottest(com.tonic.analysis.query.value.Value, com.tonic.analysis.query.value.Value)).booleantest(Value lhs, Value rhs)Applies this operator, dispatching onValueKind.static OperatorvalueOf(String name)Returns the enum constant of this type with the specified name.static Operator[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
EQ
public static final Operator EQ
Equality within a value kind - type names compared in canonical form, numbers compared as doubles across int and real, and two nulls equal.
-
NEQ
public static final Operator NEQ
Negation ofEQ, so two values of incomparable kinds are unequal.
-
LT
public static final Operator LT
Strictly less than, numeric operands only; false for any other kind pairing.
-
LTE
public static final Operator LTE
Less than or equal, numeric operands only; false for any other kind pairing.
-
GT
public static final Operator GT
Strictly greater than, numeric operands only; false for any other kind pairing.
-
GTE
public static final Operator GTE
Greater than or equal, numeric operands only; false for any other kind pairing.
-
MATCHES
public static final Operator MATCHES
Regular-expression match of the left string against the right pattern.
-
CONTAINS
public static final Operator CONTAINS
Substring or membership containment, depending on the operand kinds.
-
STARTS_WITH
public static final Operator STARTS_WITH
String prefix test; false unless both operands are strings.
-
ENDS_WITH
public static final Operator ENDS_WITH
String suffix test; false unless both operands are strings.
-
IN
public static final Operator IN
Set membership; false unless the right operand is a set.
-
FLOWS_TO
public static final Operator FLOWS_TO
Data-flow reachability from the left operand to the right, evaluated over SSA rather than bytest(com.tonic.analysis.query.value.Value, com.tonic.analysis.query.value.Value), which always returns false for it.
-
FLOWS_FROM
public static final Operator FLOWS_FROM
Data-flow reachability into the left operand from the right, evaluated over SSA rather than bytest(com.tonic.analysis.query.value.Value, com.tonic.analysis.query.value.Value), which always returns false for it.
-
SUBTYPE_OF
public static final Operator SUBTYPE_OF
Subtype relation between two types, resolved by the query engine rather than bytest(com.tonic.analysis.query.value.Value, com.tonic.analysis.query.value.Value), which always returns false for it.
-
-
Method Detail
-
values
public static Operator[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Operator c : Operator.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Operator valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
isRelational
public boolean isRelational()
Data-flow relations whose right operand is an accessor, evaluated over SSA (nottest(com.tonic.analysis.query.value.Value, com.tonic.analysis.query.value.Value)).- Returns:
- true for FLOWS_TO and FLOWS_FROM
-
-