📄 repeatrule.html
字号:
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.pim.RepeatRule.FEBRUARY">Constant
Field Values</A></DD></DL>
</DD>
</DL>
<HR>
<A NAME="MARCH"><!-- --></A><H3>
MARCH</H3>
<PRE>
public static final int <B>MARCH</B></PRE>
<DL>
<DD>
Constant for the month of March used with <code>MONTH_IN_YEAR</code> field.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.pim.RepeatRule.MARCH">Constant
Field Values</A></DD></DL>
</DD>
</DL>
<HR>
<A NAME="APRIL"><!-- --></A><H3>
APRIL</H3>
<PRE>
public static final int <B>APRIL</B></PRE>
<DL>
<DD>
Constant for the month of April used with <code>MONTH_IN_YEAR</code> field.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.pim.RepeatRule.APRIL">Constant
Field Values</A></DD></DL>
</DD>
</DL>
<HR>
<A NAME="MAY"><!-- --></A><H3>
MAY</H3>
<PRE>
public static final int <B>MAY</B></PRE>
<DL>
<DD>
Constant for the month of May used with <code>MONTH_IN_YEAR</code> field.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.pim.RepeatRule.MAY">Constant
Field Values</A></DD></DL>
</DD>
</DL>
<HR>
<A NAME="JUNE"><!-- --></A><H3>
JUNE</H3>
<PRE>
public static final int <B>JUNE</B></PRE>
<DL>
<DD>
Constant for the month of June used with <code>MONTH_IN_YEAR</code> field.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.pim.RepeatRule.JUNE">Constant
Field Values</A></DD></DL>
</DD>
</DL>
<HR>
<A NAME="JULY"><!-- --></A><H3>
JULY</H3>
<PRE>
public static final int <B>JULY</B></PRE>
<DL>
<DD>
Constant for the month of July used with <code>MONTH_IN_YEAR</code> field.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.pim.RepeatRule.JULY">Constant
Field Values</A></DD></DL>
</DD>
</DL>
<HR>
<A NAME="AUGUST"><!-- --></A><H3>
AUGUST</H3>
<PRE>
public static final int <B>AUGUST</B></PRE>
<DL>
<DD>
Constant for the month of August used with <code>MONTH_IN_YEAR</code> field.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.pim.RepeatRule.AUGUST">Constant
Field Values</A></DD></DL>
</DD>
</DL>
<HR>
<A NAME="SEPTEMBER"><!-- --></A><H3>
SEPTEMBER</H3>
<PRE>
public static final int <B>SEPTEMBER</B></PRE>
<DL>
<DD>
Constant for the month of September used with <code>MONTH_IN_YEAR</code> field.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.pim.RepeatRule.SEPTEMBER">Constant
Field Values</A></DD></DL>
</DD>
</DL>
<HR>
<A NAME="OCTOBER"><!-- --></A><H3>
OCTOBER</H3>
<PRE>
public static final int <B>OCTOBER</B></PRE>
<DL>
<DD>
Constant for the month of October used with <code>MONTH_IN_YEAR</code> field.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.pim.RepeatRule.OCTOBER">Constant
Field Values</A></DD></DL>
</DD>
</DL>
<HR>
<A NAME="NOVEMBER"><!-- --></A><H3>
NOVEMBER</H3>
<PRE>
public static final int <B>NOVEMBER</B></PRE>
<DL>
<DD>
Constant for the month of November used with <code>MONTH_IN_YEAR</code> field.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.pim.RepeatRule.NOVEMBER">Constant
Field Values</A></DD></DL>
</DD>
</DL>
<HR>
<A NAME="DECEMBER"><!-- --></A><H3>
DECEMBER</H3>
<PRE>
public static final int <B>DECEMBER</B></PRE>
<DL>
<DD>
Constant for the month of December used with <code>MONTH_IN_YEAR</code> field.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.pim.RepeatRule.DECEMBER">Constant
Field Values</A></DD></DL>
</DD>
</DL>
<!-- ========= 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="RepeatRule()"><!-- --></A><H3>
RepeatRule</H3>
<PRE>
public <B>RepeatRule</B>()</PRE>
<DL>
<DD>
Default constructor.
<P></P>
</DD>
</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="dates(long, long, long)"><!-- --></A><H3>
dates</H3>
<PRE>
public java.util.Enumeration <B>dates</B>(long startDate,
long subsetBeginning,
long subsetEnding)</PRE>
<DL>
<DD>
Returns an Enumeration of dates on which an Event would occur. A start date is
specified form which the repeating rule is applied to generate dates. Then a
beginning date and a start date is also provided to return only a subset of all
possible occurrences of an Event within the given timeframe. The sequence of
the items is by date. Exceptional dates are not included in the returned
Enumeration.
<BR>
For example, an Event may happen every Monday during a year starting on January
1st. However, one wants to know occurrences of the Event during the month of
June only. The startDate parameter specifies the anchor point for the Event
from which it begins repeating, and the subsetBeginning and subsetEnding
parameters would limit the Events returned to those only in June in this
example.
<P></P>
<DD>
<DL>
<DT><B>Parameters:</B><DD><CODE>startDate</CODE> - the start date for the sequence,
from which the repeat rule is applied to generate possible occurrence dates.
This value must be expressed in the same long value format as java.util.Date,
which is milliseconds since the epoch (00:00:00 GMT, January 1, 1970).<DD><CODE>subsetBeginning</CODE>
- the beginning date of the period for which events should be returned. This
value must be expressed in the same long value format as java.util.Date, which
is milliseconds since the epoch (00:00:00 GMT, January 1, 1970).<DD><CODE>subsetEnding</CODE>
- the end date of the period for which events should be returned. This value
must be expressed in the same long value format as java.util.Date, which is
milliseconds since the epoch (00:00:00 GMT, January 1, 1970). <DT><B>Returns:</B><DD>an
Enumeration of dates for the given parameters, with the Enumeration containing <code>
java.util.Date</code> instances. <DT><B>Throws:</B>
<DD>
<CODE>java.lang.IllegalArgumentException</CODE> - if <code>beginning</code> is
greater than <code>ending</code>.</DD></DL>
</DD>
</DL>
<HR>
<A NAME="addExceptDate(long)"><!-- --></A><H3>
addExceptDate</H3>
<PRE>
public void <B>addExceptDate</B>(long date)</PRE>
<DL>
<DD>
Add a Date for which this RepeatRule should not occur. This value may be
rounded off to the date only from a date time stamp if the underlying platform
implementation only supports date fields with dates only and not date time
stamps.
<P></P>
<DD>
<DL>
<DT><B>Parameters:</B><DD><CODE>date</CODE> - the date to add to the list of except
dates, expressed in the same long value format as java.util.Date, which is
milliseconds since the epoch (00:00:00 GMT, January 1, 1970).</DD></DL>
</DD>
</DL>
<HR>
<A NAME="removeExceptDate(long)"><!-- --></A><H3>
removeExceptDate</H3>
<PRE>
public void <B>removeExceptDate</B>(long date)</PRE>
<DL>
<DD>
Remove a Date for which this RepeatRule should not occur. If the date was in
the list of except dates, it is removed.
<P></P>
<DD>
<DL>
<DT><B>Parameters:</B><DD><CODE>date</CODE> - the date to remove from the list of
except dates expressed in the same long value format as java.util.Date, which
is milliseconds since the epoch (00:00:00 GMT, January 1, 1970).</DD></DL>
</DD>
</DL>
<HR>
<A NAME="getExceptDates()"><!-- --></A><H3>
getExceptDates</H3>
<PRE>
public java.util.Enumeration <B>getExceptDates</B>()</PRE>
<DL>
<DD>
Returns the Dates for which this RepeatRule should not occur.
<P></P>
<DD>
<DL>
<DT><B>Returns:</B><DD>an Enumeration of dates for which this RepeatRule should not
occur, with the Enumeration containing <code>java.util.Date</code> instances.</DD></DL>
</DD>
</DL>
<HR>
<A NAME="getInt(int)"><!-- --></A><H3>
getInt</H3>
<PRE>
public int <B>getInt</B>(int field)</PRE>
<DL>
<DD>
Retrieves an integer field. The field values can be one of <code>COUNT,
DAY_IN_MONTH, FREQUENCY, INTERVAL, MONTH_IN_YEAR, WEEK_IN_MONTH, DAY_IN_WEEK,
DAY_IN_YEAR</code>. <A HREF="../../../javax/microedition/pim/RepeatRule.html#getFields()">
<CODE>getFields()</CODE></A> should be checked prior to invoking the method
to ensure the field has a value associated with it.
<P></P>
<DD>
<DL>
<DT><B>Parameters:</B><DD><CODE>field</CODE> - The field to get, for example <code>COUNT</code>.
<DT><B>Returns:</B><DD>an int representing the value of the field. <DT><B>Throws:</B>
<DD>
<CODE>java.lang.IllegalArgumentException</CODE> - if field is not one of the
the valid RepeatRule fields for this method.
<DD>
<CODE><A HREF="../../../javax/microedition/pim/FieldEmptyException.html">FieldEmptyException</A></CODE>
- if the field does is a valid integer field but does not have any data values
assigned to it.</DD></DL>
</DD>
</DL>
<HR>
<A NAME="setInt(int, int)"><!-- --></A><H3>
setInt</H3>
<PRE>
public void <B>setInt</B>(int field,
int value)</PRE>
<DL>
<DD>
Sets an integer field. The field value can be one of <code>COUNT, DAYNUMBER,
FREQUENCY, INTERVAL, MONTH_IN_YEAR, WEEK_IN_MONTH, DAY_IN_WEEK, DAY_IN_YEAR<
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -