public class CeilingFunction extends Object implements Function
4.4 number ceiling(number)
The ceiling function returns the smallest (closest to negative infinity) number that is not less than the argument and that is an integer....If the argument is NaN, then NaN is returned. If the argument is positive infinity, then positive infinity is returned. If the argument is negative infinity, then negative infinity is returned. If the argument is positive zero, then positive zero is returned. If the argument is negative zero, then negative zero is returned. If the argument is less than zero, but greater than -1, then negative zero is returned.
Constructor and Description |
---|
CeilingFunction()
Create a new
CeilingFunction object. |
Modifier and Type | Method and Description |
---|---|
Object |
call(Context context,
List args)
Returns the smallest integer greater than or equal to a number.
|
static Double |
evaluate(Object obj,
Navigator nav)
Returns the smallest integer greater than or equal to the argument.
|
public Object call(Context context, List args) throws FunctionCallException
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
Double
as if by the XPath number()
functionDouble
containing the smallest integer greater than or equal
args.get(0)
FunctionCallException
- if args
has more or less than one itempublic static Double evaluate(Object obj, Navigator nav)
Double
as if by the XPath number()
function.obj
- the object whose ceiling is returnednav
- ignoredDouble
containing the smallest integer
greater than or equal to obj
Copyright 2001–2022 The Jaxen Project. All rights reserved.