org.jaxen.function

Class NotFunction

public class NotFunction extends Object implements Function

4.3 boolean not(boolean)

The not function returns true if its argument is false, and false otherwise.

Author: bob mcwhirter (bob @ werken.com)

See Also: Section 4.3 of the XPath Specification

Constructor Summary
NotFunction()
Create a new NotFunction object.
Method Summary
Objectcall(Context context, List args)
Returns Boolean.TRUE if the boolean value of args.get(0) is false, and Boolean.FALSE otherwise.
static Booleanevaluate(Object obj, Navigator nav)
Returns Boolean.TRUE if the boolean value of obj is false, and Boolean.FALSE otherwise.

Constructor Detail

NotFunction

public NotFunction()
Create a new NotFunction object.

Method Detail

call

public Object call(Context context, List args)
Returns Boolean.TRUE if the boolean value of args.get(0) is false, and Boolean.FALSE otherwise. The boolean value is calculated as if by the XPath boolean function.

Parameters: context the context at the point in the expression where the function is called args a single element list

Returns: Boolean.TRUE if the boolean value of obj is false, and Boolean.FALSE otherwise

Throws: FunctionCallException if args does not have exactly one argument

evaluate

public static Boolean evaluate(Object obj, Navigator nav)
Returns Boolean.TRUE if the boolean value of obj is false, and Boolean.FALSE otherwise. The boolean value is calculated as if by the XPath boolean function.

Parameters: obj the object whose boolean value is inverted nav the Navigator used to calculate the boolean value of obj

Returns: Boolean.TRUE if the boolean value of obj is false, and Boolean.FALSE otherwise