Interface ComparisonExpression
- All Known Implementing Classes:
CompareToConstant, CompareToIntegerConstant, CompareToStringConstant, GeneralComparison, GeneralComparison20, SwitchCaseComparison, ValueComparison
public interface ComparisonExpression
Interface implemented by expressions that perform a comparison
-
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermine whether untyped atomic values should be converted to the type of the other operandGet the AtomicComparer used to compare atomic values.getLhs()Get the left-hand operand of the comparisonGet the left-hand expressiongetRhs()Get the right-hand operand of the comparisonGet the right-hand expressionintGet the primitive (singleton) operator used: one of Token.FEQ, Token.FNE, Token.FLT, Token.FGT, Token.FLE, Token.FGEGet the StringCollator used to compare string values.
-
Method Details
-
getAtomicComparer
AtomicComparer getAtomicComparer()Get the AtomicComparer used to compare atomic values. This encapsulates any collation that is used- Returns:
- the comparer
-
getStringCollator
StringCollator getStringCollator()Get the StringCollator used to compare string values.- Returns:
- the collator. May return null if the expression will never be used to compare strings
-
getSingletonOperator
int getSingletonOperator()Get the primitive (singleton) operator used: one of Token.FEQ, Token.FNE, Token.FLT, Token.FGT, Token.FLE, Token.FGE- Returns:
- the operator, as defined in class
Token
-
getLhs
-
getRhs
-
getLhsExpression
-
getRhsExpression
-
convertsUntypedToOther
boolean convertsUntypedToOther()Determine whether untyped atomic values should be converted to the type of the other operand- Returns:
- true if untyped values should be converted to the type of the other operand, false if they should be converted to strings.
-