org.ucl.xpath.function
Class FnReverse

java.lang.Object
  extended byorg.ucl.xpath.function.Function
      extended byorg.ucl.xpath.function.FnReverse

public class FnReverse
extends Function

Sequence reverse function.

Usage: fn:reverse($arg as item()*) as item()*

This class reverses the order of items in a sequence. If $arg is the empty sequence, the empty sequence is returned.


Field Summary
 
Fields inherited from class org.ucl.xpath.function.Function
_arity, _fl, _name
 
Constructor Summary
FnReverse()
          Constructor for FnReverse.
 
Method Summary
 ResultSequence evaluate(java.util.Collection args)
          Evaluate the arguments.
static ResultSequence reverse(java.util.Collection args)
          Reverse the arguments.
 
Methods inherited from class org.ucl.xpath.function.Function
arity, convert_argument, convert_arguments, dynamic_context, name, set_function_library, signature, signature, signature, static_context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FnReverse

public FnReverse()
Constructor for FnReverse.

Method Detail

evaluate

public ResultSequence evaluate(java.util.Collection args)
                        throws DynamicError
Evaluate the arguments.

Specified by:
evaluate in class Function
Parameters:
args - are evaluated.
Returns:
The evaluation of the reversal of the arguments.
Throws:
DynamicError - Dynamic error.

reverse

public static ResultSequence reverse(java.util.Collection args)
                              throws DynamicError
Reverse the arguments.

Parameters:
args - are reversed.
Returns:
The result of the reversal of the arguments.
Throws:
DynamicError - Dynamic error.