org.ucl.xpath.function
Class FnBoolean

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

public class FnBoolean
extends Function

Computes the effective boolean value of the sequence $arg. If $arg is the empty sequence, returns false. If $arg contains a single atomic value, then the function returns false if $arg is: - The singleton xs:boolean value false. - The singleton value "" (zero-length string) of type xs:string or xdt:untypedAtomic. - A singleton numeric value that is numerically equal to zero. - The singleton xs:float or xs:double value NaN. In all other cases, returns true.


Field Summary
 
Fields inherited from class org.ucl.xpath.function.Function
_arity, _fl, _name
 
Constructor Summary
FnBoolean()
          Constructor for FnBoolean.
 
Method Summary
 ResultSequence evaluate(java.util.Collection args)
          Evaluate arguments.
static ResultSequence fn_boolean(ResultSequence arg)
          Boolean operation.
 
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

FnBoolean

public FnBoolean()
Constructor for FnBoolean.

Method Detail

evaluate

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

Specified by:
evaluate in class Function
Parameters:
args - argument expressions.
Returns:
Result of evaluation.

fn_boolean

public static ResultSequence fn_boolean(ResultSequence arg)
Boolean operation.

Parameters:
arg - Result from the expressions evaluation.
Returns:
Result of fn:boolean operation.