org.basex.query.xpath.expr
Class Comparison

java.lang.Object
  extended by org.basex.query.xpath.expr.Expr
      extended by org.basex.query.xpath.expr.DualExpr
          extended by org.basex.query.xpath.expr.Comparison
Direct Known Subclasses:
Equality, FTContains, Relational

public abstract class Comparison
extends DualExpr

Abstract Compare Expression.

Author:
Workgroup DBIS, University of Konstanz 2005-07, ISC License, Christian Gruen

Field Summary
 Comp type
          Expression Type.
 
Fields inherited from class org.basex.query.xpath.expr.DualExpr
expr1, expr2
 
Constructor Summary
Comparison()
           
 
Method Summary
 Bool eval(XPContext ctx)
          Evaluates the expression with the specified context set.
 boolean simple()
          Checks if this equality expression is a simple one (LocationPath + XPathValue and equals check), accessing the indexes.
 java.lang.String toString()
           
 
Methods inherited from class org.basex.query.xpath.expr.DualExpr
usesPos, usesSize
 
Methods inherited from class org.basex.query.xpath.expr.Expr
compile, indexEquivalent, indexSizes, returnedValue, sameAs
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

public Comp type
Expression Type.

Constructor Detail

Comparison

public Comparison()
Method Detail

eval

public Bool eval(XPContext ctx)
          throws EvalException
Description copied from class: Expr
Evaluates the expression with the specified context set. Additionally provides a context

Specified by:
eval in class Expr
Parameters:
ctx - query context
Returns:
resulting XPathValue
Throws:
EvalException - evaluation exception

simple

public final boolean simple()
Checks if this equality expression is a simple one (LocationPath + XPathValue and equals check), accessing the indexes.

Returns:
result of check

toString

public final java.lang.String toString()
Specified by:
toString in class Expr