Class BooleanFunction
java.lang.Object
org.jaxen.function.BooleanFunction
- All Implemented Interfaces:
Function
4.3 boolean boolean(object)
The boolean function converts its argument to a boolean as follows:
a number is true if and only if it is neither positive or negative zero nor NaN
a node-set is true if and only if it is non-empty
a string is true if and only if its length is non-zero
an object of a type other than the four basic types is converted to a boolean in a way that is dependent on that type
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
BooleanFunction
public BooleanFunction()Create a newBooleanFunctionobject.
-
-
Method Details
-
call
Convert the argument to aBoolean- Specified by:
callin interfaceFunction- Parameters:
context- the context at the point in the expression when the function is calledargs- a list with exactly one item which will be converted to aBoolean- Returns:
- the result of evaluating the function;
Boolean.TRUEorBoolean.FALSE - Throws:
FunctionCallException- ifargshas more or less than one item
-