Interface ComparisonExpression

All Known Implementing Classes:
CompareToConstant, CompareToIntegerConstant, CompareToStringConstant, GeneralComparison, GeneralComparison20, GeneralEqualityEE, SwitchCaseComparison, ValueComparison

public interface ComparisonExpression
Interface implemented by expressions that perform a comparison
  • Method Details Link icon

    • getAtomicComparer Link icon

      AtomicComparer getAtomicComparer()
      Get the AtomicComparer used to compare atomic values. This encapsulates any collation that is used
      Returns:
      the comparer
    • getStringCollator Link icon

      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 Link icon

      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 Link icon

      Operand getLhs()
      Get the left-hand operand of the comparison
      Returns:
      the first operand
    • getRhs Link icon

      Operand getRhs()
      Get the right-hand operand of the comparison
      Returns:
      the second operand
    • getLhsExpression Link icon

      Expression getLhsExpression()
      Get the left-hand expression
      Returns:
      the first operand expression
    • getRhsExpression Link icon

      Expression getRhsExpression()
      Get the right-hand expression
      Returns:
      the second operand expression
    • convertsUntypedToOther Link icon

      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.