Package org.jaxen.function
Class FloorFunction
- java.lang.Object
-
- org.jaxen.function.FloorFunction
-
- All Implemented Interfaces:
Function
public class FloorFunction extends java.lang.Object implements Function
4.4
number floor(number)
The floor function returns the largest (closest to positive infinity) number that is not greater 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 greater than zero, but less than 1, then positive zero is returned.
-
-
Constructor Summary
Constructors Constructor Description FloorFunction()
Create a newFloorFunction
object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
call(Context context, java.util.List args)
Returns the largest integer less than or equal to a number.static java.lang.Double
evaluate(java.lang.Object obj, Navigator nav)
Returns the largest integer less than or equal to the argument.
-
-
-
Method Detail
-
call
public java.lang.Object call(Context context, java.util.List args) throws FunctionCallException
Returns the largest integer less than or equal to a number.- Specified by:
call
in 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 aDouble
as if by the XPathnumber()
function- Returns:
- a
Double
containing the largest integer less than or equal toargs.get(0)
- Throws:
FunctionCallException
- ifargs
has more or less than one item
-
evaluate
public static java.lang.Double evaluate(java.lang.Object obj, Navigator nav)
Returns the largest integer less than or equal to the argument. If necessary, the argument is first converted to aDouble
as if by the XPathnumber()
function.- Parameters:
obj
- the object whose floor is returnednav
- ignored- Returns:
- a
Double
containing the largest integer less than or equal toobj
-
-