org.ucl.xpath.function
Class FnRoundHalfToEven
java.lang.Object
org.ucl.xpath.function.Function
org.ucl.xpath.function.FnRoundHalfToEven
- public class FnRoundHalfToEven
- extends Function
The value returned is the nearest (that is, numerically closest) numeric to $arg that
is a multiple of ten to the power of minus $precision. If two such values are equally
near (e.g. if the fractional part in $arg is exactly .500...), returns the one whose
least significant digit is even. If type of $arg is one of the four numeric types
xs:float, xs:double, xs:decimal or xs:integer the type of the return is the same as
the type of $arg. If the type of $arg is a type derived from one of the numeric types,
the type of the return is the base numeric type.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FnRoundHalfToEven
public FnRoundHalfToEven()
- Constructor for FnRoundHalfToEven.
evaluate
public ResultSequence evaluate(java.util.Collection args)
throws DynamicError
- Evaluate arguments.
- Specified by:
evaluate
in class Function
- Parameters:
args
- argument expressions.
- Returns:
- Result of evaluation.
- Throws:
DynamicError
- Dynamic error.
fn_round_half_to_even
public static ResultSequence fn_round_half_to_even(ResultSequence arg)
throws DynamicError
- Round-Half-to-Even operation.
- Parameters:
arg
- Result from the expressions evaluation.
- Returns:
- Result of fn:round-half-to-even operation.
- Throws:
DynamicError
- Dynamic error.