📄 pimitem.html
字号:
int index)</PRE>
<DL>
<DD>
Get a date value from a field in the item. <A HREF="../../../javax/microedition/pim/PIMList.html#isSupportedField(int)">
<CODE>PIMList.isSupportedField(int)</CODE></A> should be used to verify the
field validity for this item prior to invoking this method.
<P></P>
<DD>
<DL>
<DT><B>Parameters:</B><DD><CODE>field</CODE> - The field from which the data is
retrieved.<DD><CODE>index</CODE> - an index to a particular value associated with
the field. <DT><B>Returns:</B><DD>a date representing a value of the field, returned in
the same long format as java.util.Date, which is milliseconds since the epoch
(00:00:00 GMT, January 1, 1970). <DT><B>Throws:</B>
<DD>
<CODE>java.lang.IllegalArgumentException</CODE> - if the field is not valid for
the implementing class.
<DD>
<CODE>java.lang.IndexOutOfBoundsException</CODE> - if the index is negative or
greater than or equal to the number of values currently contained in the field.
<DD>
<CODE><A HREF="../../../javax/microedition/pim/UnsupportedFieldException.html">UnsupportedFieldException</A></CODE>
- if the field is not supported in the implementing instance of the class.</DD></DL>
</DD>
</DL>
<HR>
<A NAME="addDate(int, int, long)"><!-- --></A><H3>
addDate</H3>
<PRE>
public void <B>addDate</B>(int field,
int attributes,
long value)</PRE>
<DL>
<DD>
Adds a date value to a field in the item. The value is appended as the last
data value in the field's array, similar to <code>Vector.addElement</code>. <A HREF="../../../javax/microedition/pim/PIMList.html#isSupportedField(int)">
<CODE>PIMList.isSupportedField(int)</CODE></A> should be used to verify the
field validity for this item prior to invoking this method.
<P></P>
<P>
Note that the value provided may be rounded-down by an implementation due to
platform restrictions. For example, should a native PIM database on support
date values with granularity in terms of seconds, then the provided date value
is rounded down to the nearest second.
</P>
<P>
</P>
<DD>
<DL>
<DT><B>Parameters:</B><DD><CODE>field</CODE> - The field to which the value belongs.<DD><CODE>attributes</CODE>
- a bit array specifying any optional attributes describing this value. These
attributes are a hint to the about the value's characteristics and some or all
may be ignored by this method due to platform restrictions. Attributes that are
invalid or not applicable are also ignored.<DD><CODE>value</CODE> - The data to add
to the field. The date 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>Throws:</B>
<DD>
<CODE>java.lang.IllegalArgumentException</CODE> - if the field is not valid for
the implementing class or the field does not have a data type of <code>DATE</code>.
<DD>
<CODE><A HREF="../../../javax/microedition/pim/UnsupportedFieldException.html">UnsupportedFieldException</A></CODE>
- if the field is not supported in the implementing instance of the class.
<DD>
<CODE><A HREF="../../../javax/microedition/pim/FieldFullException.html">FieldFullException</A></CODE>
- if the field already contains the maximum number of data values it can hold.</DD></DL>
</DD>
</DL>
<HR>
<A NAME="setDate(int, int, int, long)"><!-- --></A><H3>
setDate</H3>
<PRE>
public void <B>setDate</B>(int field,
int index,
int attributes,
long value)</PRE>
<DL>
<DD>
Sets an existing date data value in a field to a new value. The value located
at the provided index is set, similar to <code>Vector.setElementAt</code>. This
method cannot be used to add new values to a field; use <A HREF="../../../javax/microedition/pim/PIMItem.html#addDate(int, int, long)">
<CODE>addDate(int, int, long)</CODE></A>. <A HREF="../../../javax/microedition/pim/PIMList.html#isSupportedField(int)">
<CODE>PIMList.isSupportedField(int)</CODE></A> should be used to verify the
field validity for this item prior to invoking this method.
<P></P>
<P>
Note that the value provided may be rounded-down by an implementation due to
platform restrictions. For example, should a native PIM database only support
date values with granularity in terms of seconds, then the provided date value
is rounded down to the nearest second.
</P>
<P>
</P>
<DD>
<DL>
<DT><B>Parameters:</B><DD><CODE>field</CODE> - The field to which the value belongs.<DD><CODE>index</CODE>
- an index to a particular value associated with the field.<DD><CODE>attributes</CODE>
- a bit array specifying any optional attributes describing this value. These
attributes are a hint to the about the value's characteristics and some or all
may be ignored by this method due to platform restrictions. Attributes that are
invalid or not applicable are also ignored.<DD><CODE>value</CODE> - The new value
of the data at the field's index. The date 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>Throws:</B>
<DD>
<CODE>java.lang.IllegalArgumentException</CODE> - if the field is not valid for
the implementing class, or the field cannot be set to the value provided (e.g.
the value is not valid for that field or this field's value is read-only).
<DD>
<CODE><A HREF="../../../javax/microedition/pim/UnsupportedFieldException.html">UnsupportedFieldException</A></CODE>
- if the field is not supported in the implementing instance of the class.
<DD>
<CODE>java.lang.IndexOutOfBoundsException</CODE> - if the index is negative or
greater than or equal to the number of values currently contained in the field.</DD></DL>
</DD>
</DL>
<HR>
<A NAME="getInt(int, int)"><!-- --></A><H3>
getInt</H3>
<PRE>
public int <B>getInt</B>(int field,
int index)</PRE>
<DL>
<DD>
Get an integer value from a field in the item. <A HREF="../../../javax/microedition/pim/PIMList.html#isSupportedField(int)">
<CODE>PIMList.isSupportedField(int)</CODE></A> should be used to verify the
field validity for this item prior to invoking this method.
<P></P>
<DD>
<DL>
<DT><B>Parameters:</B><DD><CODE>field</CODE> - The field from which the data is
retrieved.<DD><CODE>index</CODE> - an index to a particular value associated with
the field. <DT><B>Returns:</B><DD>an int representing a value of the field. <DT><B>Throws:</B>
<DD>
<CODE>java.lang.IllegalArgumentException</CODE> - if the field is not valid for
the implementing class.
<DD>
<CODE>java.lang.IndexOutOfBoundsException</CODE> - if the index is negative or
greater than or equal to the number of values currently contained in the field.
<DD>
<CODE><A HREF="../../../javax/microedition/pim/UnsupportedFieldException.html">UnsupportedFieldException</A></CODE>
- if the field is not supported in the implementing instance of the class.</DD></DL>
</DD>
</DL>
<HR>
<A NAME="addInt(int, int, int)"><!-- --></A><H3>
addInt</H3>
<PRE>
public void <B>addInt</B>(int field,
int attributes,
int value)</PRE>
<DL>
<DD>
Adds an integer value to a field in the item. The value is appended as the last
data value in the field's array, similar to <code>Vector.addElement</code>. <A HREF="../../../javax/microedition/pim/PIMList.html#isSupportedField(int)">
<CODE>PIMList.isSupportedField(int)</CODE></A> should be used to verify the
field validity for this item prior to invoking this method.
<P></P>
<DD>
<DL>
<DT><B>Parameters:</B><DD><CODE>field</CODE> - The field to which the value belongs.<DD><CODE>attributes</CODE>
- a bit array specifying any optional attributes describing this value. These
attributes are a hint to the about the value's characteristics and some or all
may be ignored by this method due to platform restrictions. Attributes that are
invalid or not applicable are also ignored.<DD><CODE>value</CODE> - The data to add
to the field. <DT><B>Throws:</B>
<DD>
<CODE>java.lang.IllegalArgumentException</CODE> - if the field is not valid for
the implementing class or the field does not have a data type of <code>INT</code>.
<DD>
<CODE><A HREF="../../../javax/microedition/pim/UnsupportedFieldException.html">UnsupportedFieldException</A></CODE>
- if the field is not supported in the implementing instance of the class.
<DD>
<CODE><A HREF="../../../javax/microedition/pim/FieldFullException.html">FieldFullException</A></CODE>
- if the field already contains the maximum number of data values it can hold.</DD></DL>
</DD>
</DL>
<HR>
<A NAME="setInt(int, int, int, int)"><!-- --></A><H3>
setInt</H3>
<PRE>
public void <B>setInt</B>(int field,
int index,
int attributes,
int value)</PRE>
<DL>
<DD>
Sets an existing int data value in a field to a new value. The value located at
the provided index is set, similar to <code>Vector.setElementAt</code>. This
method cannot be used to add new values to a field; use <A HREF="../../../javax/microedition/pim/PIMItem.html#addInt(int, int, int)">
<CODE>addInt(int, int, int)</CODE></A>. <A HREF="../../../javax/microedition/pim/PIMList.html#isSupportedField(int)">
<CODE>PIMList.isSupportedField(int)</CODE></A> should be used to verify the
field validity for this item prior to invoking this method.
<P></P>
<DD>
<DL>
<DT><B>Parameters:</B><DD><CODE>field</CODE> - The field to which the value belongs.<DD><CODE>index</CODE>
- an index to a particular value associated with the field.<DD><CODE>attributes</CODE>
- a bit array specifying any optional attributes describing this value. These
attributes are a hint to the about the value's characteristics and some or all
may be ignored by this method due to platform restrictions. Attributes that are
invalid or not applicable are also ignored.<DD><CODE>value</CODE> - The new value
of the data at the field's index. <DT><B>Throws:</B>
<DD>
<CODE>java.lang.IllegalArgumentException</CODE> - if the field is not valid for
the implementing class, or the field cannot be set to the value provided (e.g.
the value is not valid for that field or this field's value is read-only).
<DD>
<CODE><A HREF="../../../javax/microedition/pim/UnsupportedFieldException.html">UnsupportedFieldException</A></CODE>
- if the field is not supported in the implementing instance of the class.
<DD>
<CODE>java.lang.IndexOutOfBoundsException</CODE> - if the index is negative or
greater than or equal to the number of values currently contained in the field.</DD></DL>
</DD>
</DL>
<HR>
<A NAME="getString(int, int)"><!-- --></A><H3>
getString</H3>
<PRE>
public java.lang.String <B>getString</B>(int field,
int index)</PRE>
<DL>
<DD>
Get a String value from a field in the item. <A HREF="../../../javax/microedition/pim/PIMList.html#isSupportedField(int)">
<CODE>PIMList.isSupportedField(int)</CODE></A> should be used to verify the
field validity for this item prior to invoking this method. The returned string
contains no "escaped" characters that may have been used when importing the
field's data.
<P></P>
<DD>
<DL>
<DT><B>Parameters:</B><DD><CODE>field</CODE> - The field from which the data is
retrieved.<DD><CODE>index</CODE> - an index to a particular value associated with
the field. <DT><B>Returns:</B><DD>a String representing a va
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -