/** * Returns a new <code>Duration</code> object whose * value is <code>-this</code>. * <p>Since the <code>Duration</code> class is immutable, this method * doesn't change the value of this object. It simply computes * a new Duration object and returns it.</p> * * @return always return a non-null valid <code>Duration</code> object. */ public Duration negate() { return new SaxonDuration(duration.negate()); }
/** * Returns a new <code>Duration</code> object whose * value is <code>-this</code>. * <p>Since the <code>Duration</code> class is immutable, this method * doesn't change the value of this object. It simply computes * a new Duration object and returns it.</p> * * @return always return a non-null valid <code>Duration</code> object. */ public Duration negate() { return new SaxonDuration(duration.negate()); }
public AtomicValue compute(AtomicValue a, AtomicValue b, XPathContext c) throws XPathException { return ((CalendarValue) a).add(((DurationValue) b).negate()); }
public AtomicValue compute(AtomicValue a, AtomicValue b, XPathContext c) throws XPathException { return ((CalendarValue) a).add(((DurationValue) b).negate()); }