Package org.apache.cassandra.cql3
Enum Operator
- java.lang.Object
-
- java.lang.Enum<Operator>
-
- org.apache.cassandra.cql3.Operator
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CONTAINSCONTAINS_KEYEQGTGTEINIS_NOTLIKELIKE_CONTAINSLIKE_MATCHESLIKE_PREFIXLIKE_SUFFIXLTLTENEQ
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intgetValue()booleanisContains()Checks if this operator is CONTAINS operator.booleanisContainsKey()Checks if this operator is CONTAINS KEY operator.booleanisIN()Checks if this operator is an IN operator.abstract booleanisSatisfiedBy(AbstractType<?> type, java.nio.ByteBuffer leftOperand, java.nio.ByteBuffer rightOperand)Whether 2 values satisfy this operator (given the type they should be compared with).booleanisSlice()Checks if this operator is a slice operator.static OperatorreadFrom(java.io.DataInput input)Deserializes aOperatorinstance from the specified input.intserializedSize()java.lang.StringtoString()static OperatorvalueOf(java.lang.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.voidwriteTo(java.io.DataOutput output)Write the serialized version of thisOperatorto the specified output.
-
-
-
Enum Constant Detail
-
EQ
public static final Operator EQ
-
LT
public static final Operator LT
-
LTE
public static final Operator LTE
-
GTE
public static final Operator GTE
-
GT
public static final Operator GT
-
IN
public static final Operator IN
-
CONTAINS
public static final Operator CONTAINS
-
CONTAINS_KEY
public static final Operator CONTAINS_KEY
-
NEQ
public static final Operator NEQ
-
IS_NOT
public static final Operator IS_NOT
-
LIKE_PREFIX
public static final Operator LIKE_PREFIX
-
LIKE_SUFFIX
public static final Operator LIKE_SUFFIX
-
LIKE_CONTAINS
public static final Operator LIKE_CONTAINS
-
LIKE_MATCHES
public static final Operator LIKE_MATCHES
-
LIKE
public static final Operator LIKE
-
-
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(java.lang.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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
writeTo
public void writeTo(java.io.DataOutput output) throws java.io.IOExceptionWrite the serialized version of thisOperatorto the specified output.- Parameters:
output- the output to write to- Throws:
java.io.IOException- if an I/O problem occurs while writing to the specified output
-
getValue
public int getValue()
-
readFrom
public static Operator readFrom(java.io.DataInput input) throws java.io.IOException
Deserializes aOperatorinstance from the specified input.- Parameters:
input- the input to read from- Returns:
- the
Operatorinstance deserialized - Throws:
java.io.IOException- if a problem occurs while deserializing theTypeinstance.
-
isSatisfiedBy
public abstract boolean isSatisfiedBy(AbstractType<?> type, java.nio.ByteBuffer leftOperand, java.nio.ByteBuffer rightOperand)
Whether 2 values satisfy this operator (given the type they should be compared with).
-
serializedSize
public int serializedSize()
-
isSlice
public boolean isSlice()
Checks if this operator is a slice operator.- Returns:
trueif this operator is a slice operator,falseotherwise.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Enum<Operator>
-
isIN
public boolean isIN()
Checks if this operator is an IN operator.- Returns:
trueif this operator is an IN operator,falseotherwise.
-
isContains
public boolean isContains()
Checks if this operator is CONTAINS operator.- Returns:
trueif this operator is a CONTAINS operator,falseotherwise.
-
isContainsKey
public boolean isContainsKey()
Checks if this operator is CONTAINS KEY operator.- Returns:
trueif this operator is a CONTAINS operator,falseotherwise.
-
-