Class EqualsOperator
java.lang.Object
com.tangosol.coherence.dslquery.operator.BaseOperator<ComparisonFilter>
com.tangosol.coherence.dslquery.operator.ComparisonOperator
com.tangosol.coherence.dslquery.operator.EqualsOperator
An operator implementation representing the equality operator.
- Since:
- Coherence 12.2.1
- Author:
- jk 2013.12.03
-
Field Summary
FieldsFields inherited from class com.tangosol.coherence.dslquery.operator.BaseOperator
f_asAlias, f_fConditional, f_sSymbol -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToTokenTable(TokenTable tokenTable) Add this operator to the givenTokenTable.flip()Return the operator to use if this operation needs to be flipped due to the CohQL statement having the literal on the left hand side.makeFilter(Term termLeft, Term termRight, TermWalker walker) makeFilter(Object oLeft, Object oRight) Create aFilterfor thisBaseOperatorusing the specified left and right values.Methods inherited from class com.tangosol.coherence.dslquery.operator.BaseOperator
addAliases, getAliases, getSymbol, isConditional, makeExtractor, makeExtractor, toString, unmodifiableSet
-
Field Details
-
INSTANCE
An instance of the EqualsOperator.
-
-
Constructor Details
-
EqualsOperator
protected EqualsOperator()Construct a EqualsOperator.
-
-
Method Details
-
flip
Description copied from class:ComparisonOperatorReturn the operator to use if this operation needs to be flipped due to the CohQL statement having the literal on the left hand side. For example if the statement was "2 == foo" this would need to be flipped to put the literal on the right so giving the statement "foo == 2" and the flipped operator is still ==. But for another example such as "2 >= foo" flipping this give the statement "foo <= 2" so the operator has changed from >= to <=- Specified by:
flipin classComparisonOperator- Returns:
- the operator to use if this operation needs to be flipped due to the CohQL statement having the literal on the left hand side.
-
makeFilter
Description copied from class:BaseOperatorCreate aFilterfor thisBaseOperatorusing the specified left and rightTerms.Note: This method should be thread safe as operators are stored in a static map so may be called by multiple threads.
- Overrides:
makeFilterin classComparisonOperator- Parameters:
termLeft- the left term to use to build a FiltertermRight- the right term to use to build a Filterwalker- theTermWalkerto use to process the left and right terms- Returns:
- a Filter representing this operation.
-
makeFilter
Description copied from class:BaseOperatorCreate aFilterfor thisBaseOperatorusing the specified left and right values.Note: This method should be thread safe as operators are stored in a static map so may be called by multiple threads.
- Overrides:
makeFilterin classBaseOperator<ComparisonFilter>- Parameters:
oLeft- the left value to use to build a FilteroRight- the right value to use to build a Filter- Returns:
- a Filter representing this operation
-
addToTokenTable
Description copied from class:BaseOperatorAdd this operator to the givenTokenTable. This typically means adding this operator using its symbol and also adding any aliases.- Specified by:
addToTokenTablein classBaseOperator<ComparisonFilter>- Parameters:
tokenTable- the TokenTable to add this operator to
-