⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pimlist.html

📁 J2ME PDA开发PIM的技术规范,可使应用程序查看手机本地联系人列表, 本地文件
💻 HTML
📖 第 1 页 / 共 4 页
字号:
						data value that matches the string value provided.</TD>
				</TR>
				<TR BGCOLOR="white" CLASS="TableRowColor">
					<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;java.util.Enumeration</CODE></FONT></TD>
					<TD><CODE><B><A HREF="../../../javax/microedition/pim/PIMList.html#itemsByCategory(java.lang.String)">itemsByCategory</A></B>(java.lang.String&nbsp;category)</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an 
						enumeration of all items in the PIM list that match the provided category.</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="../../../javax/microedition/pim/PIMList.html#maxCategories()">maxCategories</A></B>()</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the maximum 
						number of categories that this list can have.</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="../../../javax/microedition/pim/PIMList.html#maxValues(int)">maxValues</A></B>(int&nbsp;field)</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Indicates the total 
						number of data values that a particular field supports in this list.</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="../../../javax/microedition/pim/PIMList.html#renameCategory(java.lang.String, java.lang.String)">renameCategory</A></B>(java.lang.String&nbsp;currentCategory, 
							java.lang.String&nbsp;newCategory)</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Renames a category 
						from an old name to a new name.</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="../../../javax/microedition/pim/PIMList.html#stringArraySize(int)">stringArraySize</A></B>(int&nbsp;stringArrayField)</CODE>
						<BR>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the size of 
						the array for the given string array field.</TD>
				</TR>
			</TABLE>
		&nbsp;
		<P>
			<!-- ============ FIELD DETAIL =========== -->
			<A NAME="field_detail"><!-- --></A>
			<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
				<TR BGCOLOR="#ccccff" CLASS="TableHeadingColor">
					<TD COLSPAN="1"><FONT SIZE="+2"> <B>Field Detail</B></FONT></TD>
				</TR>
			</TABLE>
			<A NAME="UNCATEGORIZED"><!-- --></A><H3>
				UNCATEGORIZED</H3>
			<PRE>
public static final java.lang.String <B>UNCATEGORIZED</B></PRE>
			<DL>
				<DD>
					Constant for the <A HREF="../../../javax/microedition/pim/PIMList.html#itemsByCategory(java.lang.String)">
						<CODE>itemsByCategory(java.lang.String)</CODE></A> method to indicate to 
					search for uncategorized items. The value <code>null</code> is assigned to the 
					string <code>UNCATEGORIZED</code>.
					<P>
						<DL>
						</DL>
				</DD>
			</DL>
			<!-- ========= CONSTRUCTOR DETAIL ======== -->
			<!-- ============ 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="getName()"><!-- --></A><H3>
				getName</H3>
			<PRE>
public java.lang.String <B>getName</B>()</PRE>
			<DL>
				<DD>
					Provides the name of the list. All PIMLists have a non-null name associated 
					with it.
					<P></P>
					<DD>
						<DL>
							<DT><B>Returns:</B><DD>a String representation of the list name.</DD></DL>
					</DD>
			</DL>
			<HR>
			<A NAME="close()"><!-- --></A><H3>
				close</H3>
			<PRE>
public void <B>close</B>()
           throws <A HREF="../../../javax/microedition/pim/PIMException.html">PIMException</A></PRE>
			<DL>
				<DD>
					Closes the list, releasing any resources for this list. A <code>PIMException</code>
					is thrown for any subsequent method invocations for the class instance.
					<P></P>
					<DD>
						<DL>
							<DT><B>Throws:</B>
								<DD>
									<CODE><A HREF="../../../javax/microedition/pim/PIMException.html">PIMException</A></CODE>
									- If the list is no longer accessible.</DD></DL>
					</DD>
			</DL>
			<HR>
			<A NAME="items()"><!-- --></A><H3>
				items</H3>
			<PRE>
public java.util.Enumeration <B>items</B>()
                            throws <A HREF="../../../javax/microedition/pim/PIMException.html">PIMException</A></PRE>
			<DL>
				<DD>
					Return an Enumeration of all items in the list. The order is undefined.
					<P></P>
					<DD>
						<DL>
							<DT><B>Returns:</B><DD>an Enumeration of all items. <DT><B>Throws:</B>
										<DD>
											<CODE><A HREF="../../../javax/microedition/pim/PIMException.html">PIMException</A></CODE>
											- If an error occurs or the list is no longer accessible or closed.
											<DD>
												<CODE>java.lang.SecurityException</CODE> - if the application is not given 
												permission to read the PIM list or the list is opened WRITE_ONLY.</DD></DL>
					</DD>
			</DL>
			<HR>
			<A NAME="items(javax.microedition.pim.PIMItem)"><!-- --></A><H3>
				items</H3>
			<PRE>
public java.util.Enumeration <B>items</B>(<A HREF="../../../javax/microedition/pim/PIMItem.html">PIMItem</A>&nbsp;matchingItem)
                            throws <A HREF="../../../javax/microedition/pim/PIMException.html">PIMException</A></PRE>
			<DL>
				<DD>
					Return an Enumeration of all items in the list that contain fields that match 
					all of those fields specified in the given matching item. An item that matches 
					may have more data than is specified in the matching item, but must at least 
					match all fields specified in the matching item. Only fields that have values 
					set within the matching item are used for matching comparisons (i.e. fields 
					returned by <A HREF="../../../javax/microedition/pim/PIMItem.html#getFields()"><CODE>PIMItem.getFields()</CODE></A>
					for the matching item).
					<P>
						Matching is done with the following rules and may be locale dependent:
						<ul>
							<li>
							When matching values for a particular field, the indexes associated with a 
							value in a field is not used and irrelevant. A match is considered positive if 
							the searched-for value appears in a field at any index. For example, a string 
							value of "Bob" at index 0 in a PIMItem field matches "Bob" at index 0, index 1, 
							or any index in that field in another PIMItem.<li>
								When matching values for a particular field, all of the attributes specified in 
								the search-for value must be a subset or complete set of attributes in a 
								compared value in order for the match to be considered positive. For example, 
								if <code>ATTR_HOME</code> were specified with the searched-for value, then 
								values with attributes <code>ATTR_HOME</code> or <code>ATTR_HOME|ATTR_MOBILE</code>
								(or any other attributes OR'd with <code>ATTR_HOME</code>) would satisfy 
							this attribute matching rule.<li>
								<code>PIMItem.ATTR_NONE</code> is an exception to the above rule such that <code>PIMItem.ATTR_NONE</code>
								is an unspecified member of every attribute set and therefore matches all 
								attribute sets. For example, if <code>ATTR_NONE</code>
							were specified with a searched-for value of "Bob", then all "Bob" values 
							regardless of its actual assigned attributes would satisfy this attribute 
							matching rule.<li>
								Implementations have the option of ignoring attribute hints assigned per value 
								in a field. The evaluation of the attribute hints are applied prior to 
								comparison by the implementation. For example, if <code>ATTR_HOME|ATTR_MOBILE</code>
								were specified with the searched-for value but <code>ATTR_MOBILE</code> was not 
								supported in the particular list being searched, then this method would use <code>ATTR_HOME</code>
								as the attribute to match for according to the other attribute maching rules. 
								To avoid this situation in which the attribute sets used may different than 
								intended, it is recommended to verify the attribute's validity using <A HREF="../../../javax/microedition/pim/PIMList.html#isSupportedAttribute(int, int)">
									<CODE>isSupportedAttribute(int, int)</CODE></A>
							prior to setting the attribute in the searched-for PIMItem.<li>
							For fields that store Strings as values, matching is defined as true if the 
							input String field value is contained anywhere within the field's stored String 
							value. The locale of the device MAY be used as a basis for the matching rules. 
							Comparisons are case insensitive if case is supported in the current locale. 
							For example, if the matching item NOTE field is set to "pho", a positive match 
							occurs in the strings "Mobile phone" and "THIS IS A PHONE NOTE" as well as the 
							string "telephone". If an empty string is provided in the matching item (i.e. 
							String("")), the empty string matches all set values for the field.<li>
								All the other data types besides Strings must match data values exactly (i.e. 
								equals()).
							</li>
						</ul>
					<P></P>
					<DD>
						<DL>
							<DT><B>Parameters:</B><DD><CODE>matchingItem</CODE> - the item whose set fields are 
									used for finding matching items. This item must have been created using this 
									same list. <DT><B>Returns:</B><DD>an enumeration of all items that contains fields that 
											match all of the fields of the item parameter. <DT><B>Throws:</B>
												<DD>
													<CODE><A HREF="../../../javax/microedition/pim/PIMException.html">PIMException</A></CODE>
													- If an error occurs or the list is no longer accessible or closed.
													<DD>
														<CODE>java.lang.IllegalArgumentException</CODE> - If the item provided did not 
														originate from this list.
														<DD>
															<CODE>java.lang.NullPointerException</CODE> - if <code>matching</code> is <code>null</code>.
															<DD>
																<CODE>java.lang.SecurityException</CODE> - if the application is not given 
																permission to read the PIM list or the list is opened WRITE_ONLY.</DD></DL>
					</DD>
			</DL>
			<HR>
			<A NAME="items(java.lang.String)"><!-- --></A><H3>
				items</H3>
			<PRE>
public java.util.Enumeration <B>items</B>(java.lang.String&nbsp;matchingValue)
                            throws <A HREF="../../../javax/microedition/pim/PIMException.html">PIMException</A></PRE>
			<DL>
				<DD>
					Return an Enumeration of all items in the list that contain at least one String 
					field data value that matches the string value provided. Only fields that have 
					values set within the matching item are used for matching comparisons (i.e. 
					fields returned by <A HREF="../../../javax/microedition/pim/PIMItem.html#getFields()">
						<CODE>PIMItem.getFields()</CODE></A> for the matching item). NOTE: this 
					method may not be as optimized as <A HREF="../../../javax/microedition/pim/PIMList.html#items(javax.microedition.pim.PIMItem)">
						<CODE>items(PIMItem)</CODE></A> so that method should be used instead of 
					this one if applicable.
					<P>
						Matching is done with the following rules and may be locale dependent:
						<ul>
							<li>
							The locale of the device MAY be used as a basis for the matching rules. 
							Comparisons are case insensitive if case is supported in the current locale.<li>
							A match is positive if the input String value is contained anywhere within any 
							String field's stored String value. For example, if the matching item NOTE 
							field is set to "pho", a positive match occurs in the strings "Mobile phone" 
							and "THIS IS A PHONE NOTE" as well as in the string "telephone".<li>
								If an empty string is provided in the matching item (i.e. String("")), the 
								empty string matches all set values for the field.
							</li>
						</ul>
					<P></P>
					<DD>
						<DL>
							<DT><B>Parameters:</B><DD><CODE>matchingValue</CODE> - a string value to which all set 
									String field values are compared. <DT><B>Returns:</B><DD>an enumeration of all items 
											that contain at least one field that matches the string parameter. <DT><B>Throws:</B>
												<DD>
													<CODE><A HREF="../../../javax/microedition/pim/PIMException.html">PIMException</A></CODE>
													- If an error occurs or the list is no longer accessible or closed.
													<DD>
														<CODE>java.lang.NullPointerException</CODE> - if <code>matching</code> is <code>null</code>.
														<DD>
															<CODE>java.lang.SecurityException</CODE> - if the application is not given 
															permission to read the PIM list or the list is opened WRITE_ONLY.</DD></DL>
					</DD>
			</DL>
			<HR>
			<A NAME="itemsByCategory(java.lang.String)"><!-- --></A><H3>
				itemsByCategory</H3>
			<PRE>
public java.util.Enumeration <B>itemsByCategory</B>(java.lang.String&nbsp;category)
                                      throws <A HREF="../../../javax/microedition/pim/PIMException.html">PIMException</A></PRE>
			<DL>
				<DD>
					Returns an enumeration of all items in the PIM list that match the provided 
					category.
					<P></P>
					<P>
						Category matching rules:
						<ul>
							<li>
							A PIM list item that contains the given category is in the returned 
							enumeration.
							<li>
							A category string that matches none of the categories of the items in the PIM 
							list returns an empty enumeration.
							<li>
								Use of the category string <code>UNCATEGORIZED</code>
							returns an enumeration of all PIM items of the PIM list that have no category 
							assignments.
							<li>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -