org.basex.query.xpath.expr
Class Union

java.lang.Object
  extended by org.basex.query.xpath.expr.Expr
      extended by org.basex.query.xpath.expr.ArrayExpr
          extended by org.basex.query.xpath.expr.Union

public final class Union
extends ArrayExpr

XPath Union Expression. This expresses the union of two node sets.

Author:
Workgroup DBIS, University of Konstanz 2005-07, ISC License, Tim Petrowsky

Field Summary
 
Fields inherited from class org.basex.query.xpath.expr.ArrayExpr
exprs
 
Constructor Summary
Union(Expr[] e)
          Constructor.
 
Method Summary
 Expr compile(XPContext ctx)
          Tries to optimize the Expression.
 NodeSet eval(XPContext ctx)
          Evaluates the expression with the specified context set.
 
Methods inherited from class org.basex.query.xpath.expr.ArrayExpr
sameAs, toString, usesPos, usesSize
 
Methods inherited from class org.basex.query.xpath.expr.Expr
indexEquivalent, indexSizes, returnedValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Union

public Union(Expr[] e)
Constructor.

Parameters:
e - operands joined with the union operator
Method Detail

compile

public Expr compile(XPContext ctx)
             throws EvalException
Description copied from class: Expr
Tries to optimize the Expression.

Specified by:
compile in class Expr
Parameters:
ctx - expression context
Returns:
optimized Expression
Throws:
EvalException - evaluation exception

eval

public NodeSet 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