org.openrdf.query.algebra.evaluation.util
Class MathUtil
java.lang.Object
org.openrdf.query.algebra.evaluation.util.MathUtil
public class MathUtil
- extends Object
A utility class for evaluation of mathematical expressions on RDF literals.
- Author:
- Jeen Broekstra
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MathUtil
public MathUtil()
compute
public static Literal compute(Literal leftLit,
Literal rightLit,
MathExpr.MathOp op)
throws ValueExprEvaluationException
- Computes the result of applying the supplied math operator on the supplied
left and right operand.
- Parameters:
leftLit - a numeric datatype literalrightLit - a numeric datatype literalop - a mathematical operator, as definied by MathExpr.MathOp.
- Returns:
- a numeric datatype literal containing the result of the operation.
The result will be datatype according to the most specific data
type the two operands have in common per the SPARQL/XPath spec.
- Throws:
ValueExprEvaluationException
Copyright © 2001-2012 Aduna. All Rights Reserved.