net.sf.joost.stx
Class FunctionTable.Exists

java.lang.Object
  extended bynet.sf.joost.stx.FunctionTable.Exists
All Implemented Interfaces:
FunctionTable.Instance
Enclosing class:
FunctionTable

public static final class FunctionTable.Exists
extends Object
implements FunctionTable.Instance

The exists function. Returns false if the argument is the empty sequence and true otherwise.

See Also:
fn:exists in "XQuery 1.0 and XPath 2.0 Functions and Operators"

Constructor Summary
FunctionTable.Exists()
           
 
Method Summary
 Value evaluate(Context context, int top, Tree args)
          The evaluation method.
 int getMaxParCount()
          Maximum number of parameters.
 int getMinParCount()
          Minimum number of parameters.
 String getName()
          Expanded name of the function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FunctionTable.Exists

public FunctionTable.Exists()
Method Detail

getMinParCount

public int getMinParCount()
Description copied from interface: FunctionTable.Instance
Minimum number of parameters.

Specified by:
getMinParCount in interface FunctionTable.Instance
Returns:
1

getMaxParCount

public int getMaxParCount()
Description copied from interface: FunctionTable.Instance
Maximum number of parameters.

Specified by:
getMaxParCount in interface FunctionTable.Instance
Returns:
1

getName

public String getName()
Description copied from interface: FunctionTable.Instance
Expanded name of the function.

Specified by:
getName in interface FunctionTable.Instance
Returns:
"exists"

evaluate

public Value evaluate(Context context,
                      int top,
                      Tree args)
               throws SAXException,
                      EvalException
Description copied from interface: FunctionTable.Instance
The evaluation method.

Specified by:
evaluate in interface FunctionTable.Instance
Parameters:
context - the Context object
top - the number of the upper most element on the stack
args - the current parameters
Returns:
a Value instance containing the result
Throws:
EvalException - if an error occurs while processing
SAXException - if an error occurs while processing