org.exist.xquery
Class ValueComparison

java.lang.Object
  extended by org.exist.xquery.AbstractExpression
      extended by org.exist.xquery.PathExpr
          extended by org.exist.xquery.BinaryOp
              extended by org.exist.xquery.GeneralComparison
                  extended by org.exist.xquery.ValueComparison
All Implemented Interfaces:
CompiledXQuery, Expression, IndexUseReporter, Optimizable, CompiledExpression

public class ValueComparison
extends GeneralComparison

Author:
Wolfgang Meier (wolfgang@exist-db.org)

Nested Class Summary
 
Nested classes/interfaces inherited from class org.exist.xquery.GeneralComparison
GeneralComparison.IndexFlags
 
Field Summary
 
Fields inherited from interface org.exist.xquery.Expression
DOT_TEST, EXPRESSION_ID_INVALID, IGNORE_CONTEXT, IN_NODE_CONSTRUCTOR, IN_PREDICATE, IN_UPDATE, IN_WHERE_CLAUSE, NEED_INDEX_INFO, NO_CONTEXT_ID, POSITIONAL_PREDICATE, SINGLE_STEP_EXECUTION, USE_TREE_TRAVERSAL
 
Constructor Summary
ValueComparison(XQueryContext context, Expression left, Expression right, int relation)
           
ValueComparison(XQueryContext context, int relation)
           
 
Method Summary
static boolean compareAtomic(Collator collator, AtomicValue lv, AtomicValue rv, int truncation, int relation)
          Cast the atomic operands into a comparable type and compare them.
 void dump(ExpressionDumper dumper)
          Write a diagnostic dump of the expression to the passed ExpressionDumper.
 String toString()
           
 
Methods inherited from class org.exist.xquery.GeneralComparison
accept, analyze, canOptimize, checkForQNameIndex, eval, getDependencies, getOptimizeAxis, getRelation, hasUsedIndex, optimizeOnSelf, preSelect, resetState, returnsType, setCollation
 
Methods inherited from class org.exist.xquery.BinaryOp
getLeft, getRight, setContextDocSet, setLeft, setRight
 
Methods inherited from class org.exist.xquery.PathExpr
add, add, addPath, addPredicate, dump, getCardinality, getColumn, getContext, getDocumentSet, getExpression, getLastExpression, getLength, getLine, getLiteralValue, getParent, getPrimaryAxis, isValid, replaceExpression, replaceLastExpression, reset, setContext, setPrimaryAxis, setUseStaticContext
 
Methods inherited from class org.exist.xquery.AbstractExpression
eval, getContextDocSet, getContextId, getExpressionId, getSource, setASTNode, setLocation
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.exist.xquery.Expression
eval, getCardinality, getColumn, getContext, getContextDocSet, getContextId, getExpressionId, getLine, getPrimaryAxis, getSource, setASTNode, setContextDocSet, setLocation, setPrimaryAxis
 
Methods inherited from interface org.exist.xquery.CompiledXQuery
eval, getSource
 

Constructor Detail

ValueComparison

public ValueComparison(XQueryContext context,
                       int relation)
Parameters:
context -
relation -

ValueComparison

public ValueComparison(XQueryContext context,
                       Expression left,
                       Expression right,
                       int relation)
Parameters:
context -
left -
right -
relation -
Method Detail

compareAtomic

public static boolean compareAtomic(Collator collator,
                                    AtomicValue lv,
                                    AtomicValue rv,
                                    int truncation,
                                    int relation)
                             throws XPathException
Cast the atomic operands into a comparable type and compare them.

Throws:
XPathException

dump

public void dump(ExpressionDumper dumper)
Description copied from interface: Expression
Write a diagnostic dump of the expression to the passed ExpressionDumper.

Specified by:
dump in interface Expression
Overrides:
dump in class GeneralComparison
Parameters:
dumper - the expression dumper to write to

toString

public String toString()
Overrides:
toString in class GeneralComparison


Copyright (C) Wolfgang Meier. All rights reserved.