blob: b232e382499e1db5850897a12c838cb9b8b4f270 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Thu Sep 25 16:46:59 PDT 2003 -->
<TITLE>
GDurationBuilder (XMLBeans Documentation)
</TITLE>
<META NAME="keywords" CONTENT="org.apache.xmlbeans.GDurationBuilder,GDurationBuilder class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
</HEAD>
<SCRIPT>
function asd()
{
parent.document.title="GDurationBuilder (XMLBeans Documentation)";
}
</SCRIPT>
<BODY BGCOLOR="white" onload="asd();">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../org/apache/xmlbeans/GDuration.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../org/apache/xmlbeans/QNameCache.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="GDurationBuilder.html" TARGET="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;
<SCRIPT>
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.xmlbeans</FONT>
<BR>
Class GDurationBuilder</H2>
<PRE>
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html">java.lang.Object</A>
|
+--<B>org.apache.xmlbeans.GDurationBuilder</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html">GDurationSpecification</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Serializable.html">Serializable</A></DD>
</DL>
<HR>
<DL>
<DT>public class <B>GDurationBuilder</B><DT>extends <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html">Object</A><DT>implements <A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html">GDurationSpecification</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Serializable.html">Serializable</A></DL>
<P>
Used to build <A HREF="../../../org/apache/xmlbeans/GDuration.html"><CODE>GDurations</CODE></A>.
<P>
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../serialized-form.html" TARGET="org.apache.xmlbeans.GDurationBuilder">Serialized Form</A></DL>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/apache/xmlbeans/GDurationBuilder.html#GDurationBuilder()">GDurationBuilder</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs an empty GDurationBuilder representing zero seconds.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/apache/xmlbeans/GDurationBuilder.html#GDurationBuilder(org.apache.xmlbeans.GDurationSpecification)">GDurationBuilder</A></B>(<A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html">GDurationSpecification</A>&nbsp;gDuration)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a GDurationBuilder from another GDurationBuilderSpecification.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/apache/xmlbeans/GDurationBuilder.html#GDurationBuilder(int, int, int, int, int, int, int, java.math.BigDecimal)">GDurationBuilder</A></B>(int&nbsp;sign,
int&nbsp;year,
int&nbsp;month,
int&nbsp;day,
int&nbsp;hour,
int&nbsp;minute,
int&nbsp;second,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigDecimal.html">BigDecimal</A>&nbsp;fraction)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a GDurationBuilder with the specified sign,
year, month, day, hours, minutes, seconds, and optional
fractional seconds.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../org/apache/xmlbeans/GDurationBuilder.html#GDurationBuilder(java.lang.String)">GDurationBuilder</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html">String</A>&nbsp;s)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a GDuration from a lexical
representation.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xmlbeans/GDurationBuilder.html#addGDuration(org.apache.xmlbeans.GDurationSpecification)">addGDuration</A></B>(<A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html">GDurationSpecification</A>&nbsp;duration)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds to this duration.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xmlbeans/GDurationBuilder.html#clone()">clone</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Builds another GDurationBuilder with the same value
as this one.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xmlbeans/GDurationBuilder.html#compareToGDuration(org.apache.xmlbeans.GDurationSpecification)">compareToGDuration</A></B>(<A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html">GDurationSpecification</A>&nbsp;duration)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Comparison to another GDuration.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xmlbeans/GDurationBuilder.html#getDay()">getDay</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the day-of-month component.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigDecimal.html">BigDecimal</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xmlbeans/GDurationBuilder.html#getFraction()">getFraction</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the fraction-of-second.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xmlbeans/GDurationBuilder.html#getHour()">getHour</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the hour-of-day component.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xmlbeans/GDurationBuilder.html#getMinute()">getMinute</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the minute-of-hour component.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xmlbeans/GDurationBuilder.html#getMonth()">getMonth</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the month-of-year component.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xmlbeans/GDurationBuilder.html#getSecond()">getSecond</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the second-of-minute component.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xmlbeans/GDurationBuilder.html#getSign()">getSign</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the sign of the duration: +1 is forwards
and -1 is backwards in time.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xmlbeans/GDurationBuilder.html#getYear()">getYear</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the year component.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xmlbeans/GDurationBuilder.html#isImmutable()">isImmutable</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;All GDuration instances return true.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xmlbeans/GDurationBuilder.html#isValid()">isValid</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if all of the individual components
of the duration are nonnegative.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xmlbeans/GDurationBuilder.html#normalize()">normalize</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Normalize a duration value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xmlbeans/GDurationBuilder.html#setDay(int)">setDay</A></B>(int&nbsp;day)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the day component.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xmlbeans/GDurationBuilder.html#setFraction(java.math.BigDecimal)">setFraction</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigDecimal.html">BigDecimal</A>&nbsp;fraction)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the fraction-of-second component.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xmlbeans/GDurationBuilder.html#setHour(int)">setHour</A></B>(int&nbsp;hour)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the hour component.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xmlbeans/GDurationBuilder.html#setMinute(int)">setMinute</A></B>(int&nbsp;minute)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the minute component.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xmlbeans/GDurationBuilder.html#setMonth(int)">setMonth</A></B>(int&nbsp;month)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the month component.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xmlbeans/GDurationBuilder.html#setSecond(int)">setSecond</A></B>(int&nbsp;second)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the second component.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xmlbeans/GDurationBuilder.html#setSign(int)">setSign</A></B>(int&nbsp;sign)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the sign.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xmlbeans/GDurationBuilder.html#setYear(int)">setYear</A></B>(int&nbsp;year)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the year component.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xmlbeans/GDurationBuilder.html#subtractGDuration(org.apache.xmlbeans.GDurationSpecification)">subtractGDuration</A></B>(<A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html">GDurationSpecification</A>&nbsp;duration)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Subtracts from this duration.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../org/apache/xmlbeans/GDuration.html">GDuration</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xmlbeans/GDurationBuilder.html#toGDuration()">toGDuration</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Builds a GDuration from this GDurationBuilder.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/xmlbeans/GDurationBuilder.html#toString()">toString</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The natural string representation of the duration.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html">Object</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#finalize()">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#getClass()">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#notify()">notify</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait()">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait(long)">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait(long, int)">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="GDurationBuilder()"><!-- --></A><H3>
GDurationBuilder</H3>
<PRE>
public <B>GDurationBuilder</B>()</PRE>
<DL>
<DD>Constructs an empty GDurationBuilder representing zero seconds.
<P>
</DL>
<HR>
<A NAME="GDurationBuilder(java.lang.String)"><!-- --></A><H3>
GDurationBuilder</H3>
<PRE>
public <B>GDurationBuilder</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html">String</A>&nbsp;s)</PRE>
<DL>
<DD>Constructs a GDuration from a lexical
representation.
<P>
</DL>
<HR>
<A NAME="GDurationBuilder(int, int, int, int, int, int, int, java.math.BigDecimal)"><!-- --></A><H3>
GDurationBuilder</H3>
<PRE>
public <B>GDurationBuilder</B>(int&nbsp;sign,
int&nbsp;year,
int&nbsp;month,
int&nbsp;day,
int&nbsp;hour,
int&nbsp;minute,
int&nbsp;second,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigDecimal.html">BigDecimal</A>&nbsp;fraction)</PRE>
<DL>
<DD>Constructs a GDurationBuilder with the specified sign,
year, month, day, hours, minutes, seconds, and optional
fractional seconds.
<P>
</DL>
<HR>
<A NAME="GDurationBuilder(org.apache.xmlbeans.GDurationSpecification)"><!-- --></A><H3>
GDurationBuilder</H3>
<PRE>
public <B>GDurationBuilder</B>(<A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html">GDurationSpecification</A>&nbsp;gDuration)</PRE>
<DL>
<DD>Constructs a GDurationBuilder from another GDurationBuilderSpecification.
<P>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="clone()"><!-- --></A><H3>
clone</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html">Object</A> <B>clone</B>()</PRE>
<DL>
<DD>Builds another GDurationBuilder with the same value
as this one.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#clone()">clone</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html">Object</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="toGDuration()"><!-- --></A><H3>
toGDuration</H3>
<PRE>
public <A HREF="../../../org/apache/xmlbeans/GDuration.html">GDuration</A> <B>toGDuration</B>()</PRE>
<DL>
<DD>Builds a GDuration from this GDurationBuilder.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="addGDuration(org.apache.xmlbeans.GDurationSpecification)"><!-- --></A><H3>
addGDuration</H3>
<PRE>
public void <B>addGDuration</B>(<A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html">GDurationSpecification</A>&nbsp;duration)</PRE>
<DL>
<DD>Adds to this duration. Does a fieldwise add, with no
normalization.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="subtractGDuration(org.apache.xmlbeans.GDurationSpecification)"><!-- --></A><H3>
subtractGDuration</H3>
<PRE>
public void <B>subtractGDuration</B>(<A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html">GDurationSpecification</A>&nbsp;duration)</PRE>
<DL>
<DD>Subtracts from this duration. Does a fieldwise subtraction,
with no normalization.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setSign(int)"><!-- --></A><H3>
setSign</H3>
<PRE>
public final void <B>setSign</B>(int&nbsp;sign)</PRE>
<DL>
<DD>Sets the sign.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setYear(int)"><!-- --></A><H3>
setYear</H3>
<PRE>
public void <B>setYear</B>(int&nbsp;year)</PRE>
<DL>
<DD>Sets the year component.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setMonth(int)"><!-- --></A><H3>
setMonth</H3>
<PRE>
public void <B>setMonth</B>(int&nbsp;month)</PRE>
<DL>
<DD>Sets the month component.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setDay(int)"><!-- --></A><H3>
setDay</H3>
<PRE>
public void <B>setDay</B>(int&nbsp;day)</PRE>
<DL>
<DD>Sets the day component.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setHour(int)"><!-- --></A><H3>
setHour</H3>
<PRE>
public void <B>setHour</B>(int&nbsp;hour)</PRE>
<DL>
<DD>Sets the hour component.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setMinute(int)"><!-- --></A><H3>
setMinute</H3>
<PRE>
public void <B>setMinute</B>(int&nbsp;minute)</PRE>
<DL>
<DD>Sets the minute component.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setSecond(int)"><!-- --></A><H3>
setSecond</H3>
<PRE>
public void <B>setSecond</B>(int&nbsp;second)</PRE>
<DL>
<DD>Sets the second component.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setFraction(java.math.BigDecimal)"><!-- --></A><H3>
setFraction</H3>
<PRE>
public void <B>setFraction</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigDecimal.html">BigDecimal</A>&nbsp;fraction)</PRE>
<DL>
<DD>Sets the fraction-of-second component.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="isImmutable()"><!-- --></A><H3>
isImmutable</H3>
<PRE>
public final boolean <B>isImmutable</B>()</PRE>
<DL>
<DD>All GDuration instances return true.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html#isImmutable()">isImmutable</A></CODE> in interface <CODE><A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html">GDurationSpecification</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getSign()"><!-- --></A><H3>
getSign</H3>
<PRE>
public final int <B>getSign</B>()</PRE>
<DL>
<DD>Returns the sign of the duration: +1 is forwards
and -1 is backwards in time.
This value does not necessarily reflect the
true direction of the duration if the duration
is not normalized or not normalizable.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html#getSign()">getSign</A></CODE> in interface <CODE><A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html">GDurationSpecification</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getYear()"><!-- --></A><H3>
getYear</H3>
<PRE>
public final int <B>getYear</B>()</PRE>
<DL>
<DD>Gets the year component.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html#getYear()">getYear</A></CODE> in interface <CODE><A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html">GDurationSpecification</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getMonth()"><!-- --></A><H3>
getMonth</H3>
<PRE>
public final int <B>getMonth</B>()</PRE>
<DL>
<DD>Gets the month-of-year component.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html#getMonth()">getMonth</A></CODE> in interface <CODE><A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html">GDurationSpecification</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getDay()"><!-- --></A><H3>
getDay</H3>
<PRE>
public final int <B>getDay</B>()</PRE>
<DL>
<DD>Gets the day-of-month component.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html#getDay()">getDay</A></CODE> in interface <CODE><A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html">GDurationSpecification</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getHour()"><!-- --></A><H3>
getHour</H3>
<PRE>
public final int <B>getHour</B>()</PRE>
<DL>
<DD>Gets the hour-of-day component.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html#getHour()">getHour</A></CODE> in interface <CODE><A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html">GDurationSpecification</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getMinute()"><!-- --></A><H3>
getMinute</H3>
<PRE>
public final int <B>getMinute</B>()</PRE>
<DL>
<DD>Gets the minute-of-hour component.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html#getMinute()">getMinute</A></CODE> in interface <CODE><A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html">GDurationSpecification</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getSecond()"><!-- --></A><H3>
getSecond</H3>
<PRE>
public final int <B>getSecond</B>()</PRE>
<DL>
<DD>Gets the second-of-minute component.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html#getSecond()">getSecond</A></CODE> in interface <CODE><A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html">GDurationSpecification</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getFraction()"><!-- --></A><H3>
getFraction</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigDecimal.html">BigDecimal</A> <B>getFraction</B>()</PRE>
<DL>
<DD>Gets the fraction-of-second. Range from 0 (inclusive) to 1 (exclusive).
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html#getFraction()">getFraction</A></CODE> in interface <CODE><A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html">GDurationSpecification</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="isValid()"><!-- --></A><H3>
isValid</H3>
<PRE>
public boolean <B>isValid</B>()</PRE>
<DL>
<DD>Returns true if all of the individual components
of the duration are nonnegative.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html#isValid()">isValid</A></CODE> in interface <CODE><A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html">GDurationSpecification</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="normalize()"><!-- --></A><H3>
normalize</H3>
<PRE>
public void <B>normalize</B>()</PRE>
<DL>
<DD>Normalize a duration value. This ensures that months,
hours, minutes, seconds, and fractions are positive and
within the ranges 0..11, 0..23, 0..59, etc. Negative
durations are indicated by a negative sign rather
than negative components.
<p>
Most duration specifications can be normalized to
valid durations with all positive components, but
not all of them can.
<p>
The only situations which cannot be normalized are
where the year/month and the day/hour/minute/second
offsets are of opposite sign. Days cannot be carried
into months since the length of a Gregorian month is
variable depending on when the duration is applied.
In these cases, this method normalizes the components
so that "day" is the only negative component.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="compareToGDuration(org.apache.xmlbeans.GDurationSpecification)"><!-- --></A><H3>
compareToGDuration</H3>
<PRE>
public final int <B>compareToGDuration</B>(<A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html">GDurationSpecification</A>&nbsp;duration)</PRE>
<DL>
<DD>Comparison to another GDuration.
<ul>
<li>Returns -1 if this < date. (less-than)
<li>Returns 0 if this == date. (equal)
<li>Returns 1 if this > date. (greater-than)
<li>Returns 2 if this <> date. (incomparable)
</ul>
Two instances are incomparable if they have different amounts
of information.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html#compareToGDuration(org.apache.xmlbeans.GDurationSpecification)">compareToGDuration</A></CODE> in interface <CODE><A HREF="../../../org/apache/xmlbeans/GDurationSpecification.html">GDurationSpecification</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html">String</A> <B>toString</B>()</PRE>
<DL>
<DD>The natural string representation of the duration.
<p>
Any components that are zero are omitted. Note that if the duration
is invalid, i.e., it has negative components, those negative
components are serialized out here. To check for validity, use
the isValid() method; and to normalize most durations to a valid
form use the normalize() method.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#toString()">toString</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html">Object</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../org/apache/xmlbeans/GDuration.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../org/apache/xmlbeans/QNameCache.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="GDurationBuilder.html" TARGET="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;
<SCRIPT>
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
</BODY>
</HTML>