com.japisoft.xpath.function.basic
Class Round
java.lang.Object
|
+--com.japisoft.xpath.function.AbstractFunction
|
+--com.japisoft.xpath.function.basic.Round
- All Implemented Interfaces:
- Function
- public final class Round
- extends AbstractFunction
function returns the number that is closest to the argument and that is an integer.
If there are two such numbers, then the one that is closest to positive infinity is returned.
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 or equal to -0.5, then negative zero is returned.
- Author:
- (c) 2003 JAPISOFT
Constructor Summary |
Round()
|
Method Summary |
java.lang.Object |
eval(XPathContext context,
FastVector arg)
Evalute this function for this context and the following arguments |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Round
public Round()
eval
public java.lang.Object eval(XPathContext context,
FastVector arg)
- Description copied from class:
AbstractFunction
- Evalute this function for this context and the following arguments
- Specified by:
eval
in interface Function
- Specified by:
eval
in class AbstractFunction
- Parameters:
arg
- a Vector
value, this is the responsability of the function to test the argument type
- Returns:
- an
Object
value like Integer, Boolean, String or NodeSet