|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jaxen.function.BooleanFunction
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
Constructor Summary | |
BooleanFunction()
Create a new BooleanFunction object. |
Method Summary | |
Object |
call(Context context,
List args)
Convert the argument to a Boolean |
static Boolean |
evaluate(Object obj,
Navigator nav)
Convert the argument obj to a Boolean
according to the following rules: |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BooleanFunction()
BooleanFunction
object.
Method Detail |
public Object call(Context context, List args) throws FunctionCallException
Boolean
call
in interface Function
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 a
Boolean
Boolean.TRUE
or Boolean.FALSE
FunctionCallException
- if args
has more or less than one itempublic static Boolean evaluate(Object obj, Navigator nav)
Convert the argument obj
to a Boolean
according to the following rules:
obj
- the object to convert to a booleannav
- ignored
Boolean.TRUE
or Boolean.FALSE
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |