public AtomicValue compute(AtomicValue a, AtomicValue b, XPathContext c) throws XPathException { return ((DurationValue) a).add((DurationValue) b); }
public AtomicValue compute(AtomicValue a, AtomicValue b, XPathContext c) throws XPathException { return ((DurationValue)a).add((DurationValue)b); } public AtomicType getResultType(AtomicType typeA, AtomicType typeB) {
public AtomicValue compute(AtomicValue a, AtomicValue b, XPathContext c) throws XPathException { return ((DurationValue)a).add((DurationValue)b); } public AtomicType getResultType(AtomicType typeA, AtomicType typeB) {
public AtomicValue compute(AtomicValue a, AtomicValue b, XPathContext c) throws XPathException { return ((DurationValue) a).add((DurationValue) b); }
/** * <p>Computes a new duration whose value is <code>this+rhs</code>.</p> * <p>This implementation follows the XPath semantics. This means that the operation will fail * if the duration is not a yearMonthDuration or a dayTimeDuration * * @param rhs <code>Duration</code> to add to this <code>Duration</code> * @return non-null valid Duration object. * @throws NullPointerException If the rhs parameter is null. * @throws IllegalStateException If the durations are not both dayTimeDurations, or * both yearMonthDurations. * @see #subtract(javax.xml.datatype.Duration) */ public Duration add(Duration rhs) { try { return new SaxonDuration(duration.add(((SaxonDuration) rhs).duration)); } catch (XPathException e) { throw new IllegalStateException(e.getMessage()); } }
/** * <p>Computes a new duration whose value is <code>this+rhs</code>.</p> * <p>This implementation follows the XPath semantics. This means that the operation will fail * if the duration is not a yearMonthDuration or a dayTimeDuration * * @param rhs <code>Duration</code> to add to this <code>Duration</code> * @return non-null valid Duration object. * @throws NullPointerException If the rhs parameter is null. * @throws IllegalStateException If the durations are not both dayTimeDurations, or * both yearMonthDurations. * @see #subtract(javax.xml.datatype.Duration) */ public Duration add(Duration rhs) { try { return new SaxonDuration(duration.add(((SaxonDuration) rhs).duration)); } catch (XPathException e) { throw new IllegalStateException(e.getMessage()); } }
data = ((DurationValue) data).add((DurationValue) next); } catch (XPathException e) { if ("XPTY0004".equals(e.getErrorCodeLocalPart())){
data = ((DurationValue) data).add((DurationValue) next); } catch (XPathException e) { if ("XPTY0004".equals(e.getErrorCodeLocalPart())){
throw err; data = ((DurationValue) data).add((DurationValue) next); } else { XPathException err = new XPathException(
throw err; sum = ((DurationValue)sum).add((DurationValue)next);
throw err; sum = ((DurationValue)sum).add((DurationValue)next);
throw err; sum = ((DurationValue)sum).add((DurationValue)next);
throw err; data = ((DurationValue) data).add((DurationValue) next); } else { XPathException err = new XPathException(
throw err; item = ((DurationValue)item).add((DurationValue)next);
throw err; item = ((DurationValue)item).add((DurationValue)next);
throw err; item = ((DurationValue)item).add((DurationValue)next);