public AtomicValue compute(AtomicValue a, AtomicValue b, XPathContext c) throws XPathException { return ((DurationValue) a).divide((DurationValue) b); }
public AtomicValue compute(AtomicValue a, AtomicValue b, XPathContext c) throws XPathException { return ((DurationValue)a).divide((DurationValue)b); } public AtomicType getResultType(AtomicType typeA, AtomicType typeB) {
public AtomicValue compute(AtomicValue a, AtomicValue b, XPathContext c) throws XPathException { return ((DurationValue)a).divide((DurationValue)b); } public AtomicType getResultType(AtomicType typeA, AtomicType typeB) {
public AtomicValue compute(AtomicValue a, AtomicValue b, XPathContext c) throws XPathException { return ((DurationValue) a).divide((DurationValue) b); }
/** * Compute the final result of the function, when all the input has been processed * * @return the result of the function * @throws net.sf.saxon.trans.XPathException * if a dynamic error occurs */ public Sequence<?> result() throws XPathException { if (atStart) { return EmptySequence.getInstance(); } else if (data instanceof NumericValue) { return ArithmeticExpression.compute(data, Calculator.DIV, new Int64Value(count), context); } else { return ((DurationValue) data).divide(count); } } }
/** * Compute the final result of the function, when all the input has been processed * * @return the result of the function * @throws net.sf.saxon.trans.XPathException * if a dynamic error occurs */ public Sequence<?> result() throws XPathException { if (atStart) { return EmptySequence.getInstance(); } else if (data instanceof NumericValue) { return ArithmeticExpression.compute(data, Calculator.DIV, new Int64Value(count), context); } else { return ((DurationValue) data).divide(count); } } }