📄 pimitem.html
字号:
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> 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 will be rounded down to the nearest second. </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.<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.</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>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>field</CODE> - The field from which the data will be 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.</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>
<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.<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.</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>
<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.<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.</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>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>field</CODE> - The field from which the data will be retrieved.<DD><CODE>index</CODE> - an index to a particular value associated with the field.<DT><B>Returns:</B><DD>a String representing a value of the field. A null String (e.g. String("")) is a valid data value for string.<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.</DL>
</DD>
</DL>
<HR>
<A NAME="addString(int, int, java.lang.String)"><!-- --></A><H3>
addString</H3>
<PRE>
public void <B>addString</B>(int field, int attributes, java.lang.String value)</PRE>
<DL>
<DD>Adds a String 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. Values given to this method should not be "escaped"; i.e. having special characters marked in the string by a particular escape character. Any characters that requiring special handling such as these for importing and exporting will be handled transparently by toSerialFormat and fromSerialFormat.
<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. A null String (e.g. String("")) is a valid data value for string.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if the field is not valid for the implementing class.<DD><CODE>java.lang.NullPointerException</CODE> - if <code>value</code> is <code>null</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.</DL>
</DD>
</DL>
<HR>
<A NAME="setString(int, int, int, java.lang.String)"><!-- --></A><H3>
setString</H3>
<PRE>
public void <B>setString</B>(int field, int index, int attributes, java.lang.String value)</PRE>
<DL>
<DD>Sets an existing String 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#addString(int, int, java.lang.String)"><CODE>addString(int, int, java.lang.String)</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. Values given to this method should not be "escaped"; i.e. having special characters marked in the string by a particular escape character. Any characters that requiring special handling such as these for importing and exporting will be handled transparently by toSerialFormat and fromSerialFormat.
<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. A null String (e.g. String("")) is a valid data value for string.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if the field is not valid for the implementing class.<DD><CODE>java.lang.NullPointerException</CODE> - if <code>value</code> is <code>null</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>java.lang.IndexOutOfBoundsException</CODE> - if the index is negative or greater than or equal to the number of values currently contained in the field.</DL>
</DD>
</DL>
<HR>
<A NAME="getBoolean(int, int)"><!-- --></A><H3>
getBoolean</H3>
<PRE>
public boolean <B>getBoolean</B>(int field, int index)</PRE>
<DL>
<DD>Get a boolean 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>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>field</CODE> - The field from which the data will be retrieved.<DD><CODE>index</CODE> - an index to a particular value associated with the field.<DT><B>Returns:</B><DD>a boolean 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.</DL>
</DD>
</DL>
<HR>
<A NAME="addBoolean(int, int, boolean)"><!-- --></A><H3>
addBoolean</H3>
<PRE>
public void <B>addBoolean</B>(int field, int attributes, boolean value)</PRE>
<DL>
<DD>Adds a boolean value to a field in the item. The value is appended as the last data
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -