|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.deri.iris.terms.concrete.XmlDurationWorkAroundHelper
public class XmlDurationWorkAroundHelper
IRIS duration objects are implemented using the javax.xml.datatype.Duration class. However, there are a number of problems/bugs in the implementation of this class, specifically with the add(), subtract(), equals() and compareTo() methods. These methods do not work correctly when created using BigDecimal seconds, even though the seconds component may be a whole number of seconds.
| Constructor Summary | |
|---|---|
XmlDurationWorkAroundHelper()
|
|
| Method Summary | |
|---|---|
static Duration |
add(Duration d1,
Duration d2)
Add one Duration to another, avoiding the runtime library bug that gives incorrect results when using decimal seconds. |
static int |
compare(Duration d1,
Duration d2)
Special compare method that gets around the problem in java 1.5, where years and months are converted to days after arithmetic. |
static int |
computeHashCode(Duration duration)
|
static boolean |
equals(Duration d1,
Duration d2)
Special equality method that gets around the problem in java 1.5, where years and months are converted to days after arithmetic. |
static BigDecimal |
getSeconds(XMLGregorianCalendar x)
|
static Duration |
subtract(Duration d1,
Duration d2)
Subtract one Duration from another, avoiding the runtime library bug that gives incorrect results when using decimal seconds. |
static Duration |
subtract(XMLGregorianCalendar x1,
XMLGregorianCalendar x2)
|
protected static String |
toString(GregorianCalendar g1)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XmlDurationWorkAroundHelper()
| Method Detail |
|---|
public static Duration add(Duration d1,
Duration d2)
d1 - The first durationd2 - The second duration
public static Duration subtract(Duration d1,
Duration d2)
d1 - The first durationd2 - The second duration
public static boolean equals(Duration d1,
Duration d2)
d1 - First durationd2 - Second duration
public static int compare(Duration d1,
Duration d2)
d1 - First durationd2 - Second duration
public static int computeHashCode(Duration duration)
public static BigDecimal getSeconds(XMLGregorianCalendar x)
public static Duration subtract(XMLGregorianCalendar x1,
XMLGregorianCalendar x2)
protected static String toString(GregorianCalendar g1)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||