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

📄 list.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/List.html#indexOf(java.lang.Object)">indexOf</A></B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;o)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element.</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="../../java/util/List.html#isEmpty()">isEmpty</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <tt>true</tt> if this list contains no elements.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/util/Iterator.html">Iterator</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/List.html#iterator()">iterator</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an iterator over the elements in this list in proper sequence.</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="../../java/util/List.html#lastIndexOf(java.lang.Object)">lastIndexOf</A></B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;o)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the index in this list of the last occurrence of the specified element, or -1 if this list does not contain this element.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/util/ListIterator.html">ListIterator</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/List.html#listIterator()">listIterator</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a list iterator of the elements in this list (in proper sequence).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/util/ListIterator.html">ListIterator</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/List.html#listIterator(int)">listIterator</A></B>(int&nbsp;index)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a list iterator of the elements in this list (in proper sequence), starting at the specified position in this list.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/List.html#remove(int)">remove</A></B>(int&nbsp;index)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes the element at the specified position in this list (optional operation).</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="../../java/util/List.html#remove(java.lang.Object)">remove</A></B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;o)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes the first occurrence in this list of the specified element  (optional operation).</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="../../java/util/List.html#removeAll(java.util.Collection)">removeAll</A></B>(<A HREF="../../java/util/Collection.html">Collection</A>&nbsp;c)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes from this list all the elements that are contained in the specified collection (optional operation).</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="../../java/util/List.html#retainAll(java.util.Collection)">retainAll</A></B>(<A HREF="../../java/util/Collection.html">Collection</A>&nbsp;c)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retains only the elements in this list that are contained in the specified collection (optional operation).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/List.html#set(int, java.lang.Object)">set</A></B>(int&nbsp;index,    <A HREF="../../java/lang/Object.html">Object</A>&nbsp;element)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Replaces the element at the specified position in this list with the specified element (optional operation).</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="../../java/util/List.html#size()">size</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of elements in this list.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/util/List.html">List</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/List.html#subList(int, int)">subList</A></B>(int&nbsp;fromIndex,        int&nbsp;toIndex)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a view of the portion of this list between the specified <tt>fromIndex</tt>, inclusive, and <tt>toIndex</tt>, exclusive.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/lang/Object.html">Object</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/List.html#toArray()">toArray</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an array containing all of the elements in this list in proper sequence.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../java/lang/Object.html">Object</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/List.html#toArray(java.lang.Object[])">toArray</A></B>(<A HREF="../../java/lang/Object.html">Object</A>[]&nbsp;a)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an array containing all of the elements in this list in proper sequence; the runtime type of the returned array is that of the specified array.</TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><!-- ========= 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="size()"><!-- --></A><H3>size</H3><PRE>public int <B>size</B>()</PRE><DL><DD>Returns the number of elements in this list.  If this list contains more than <tt>Integer.MAX_VALUE</tt> elements, returns <tt>Integer.MAX_VALUE</tt>.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../java/util/Collection.html#size()">size</A></CODE> in interface <CODE><A HREF="../../java/util/Collection.html">Collection</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the number of elements in this list.</DL></DD></DL><HR><A NAME="isEmpty()"><!-- --></A><H3>isEmpty</H3><PRE>public boolean <B>isEmpty</B>()</PRE><DL><DD>Returns <tt>true</tt> if this list contains no elements.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../java/util/Collection.html#isEmpty()">isEmpty</A></CODE> in interface <CODE><A HREF="../../java/util/Collection.html">Collection</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD><tt>true</tt> if this list contains no elements.</DL></DD></DL><HR><A NAME="contains(java.lang.Object)"><!-- --></A><H3>contains</H3><PRE>public boolean <B>contains</B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;o)</PRE><DL><DD>Returns <tt>true</tt> if this list contains the specified element. More formally, returns <tt>true</tt> if and only if this list contains at least one element <tt>e</tt> such that <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt>.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../java/util/Collection.html#contains(java.lang.Object)">contains</A></CODE> in interface <CODE><A HREF="../../java/util/Collection.html">Collection</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>o</CODE> - element whose presence in this list is to be tested.<DT><B>Returns:</B><DD><tt>true</tt> if this list contains the specified element.</DL></DD></DL><HR><A NAME="iterator()"><!-- --></A><H3>iterator</H3><PRE>public <A HREF="../../java/util/Iterator.html">Iterator</A> <B>iterator</B>()</PRE><DL><DD>Returns an iterator over the elements in this list in proper sequence.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../java/util/Collection.html#iterator()">iterator</A></CODE> in interface <CODE><A HREF="../../java/util/Collection.html">Collection</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>an iterator over the elements in this list in proper sequence.</DL></DD></DL><HR><A NAME="toArray()"><!-- --></A><H3>toArray</H3><PRE>public <A HREF="../../java/lang/Object.html">Object</A>[] <B>toArray</B>()</PRE><DL><DD>Returns an array containing all of the elements in this list in proper sequence.  Obeys the general contract of the <tt>Collection.toArray</tt> method.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../java/util/Collection.html#toArray()">toArray</A></CODE> in interface <CODE><A HREF="../../java/util/Collection.html">Collection</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>an array containing all of the elements in this list in proper	       sequence.<DT><B>See Also: </B><DD><A HREF="../../java/util/Arrays.html#asList(java.lang.Object[])"><CODE>Arrays.asList(Object[])</CODE></A></DL></DD></DL><HR><A NAME="toArray(java.lang.Object[])"><!-- --></A><H3>toArray</H3><PRE>public <A HREF="../../java/lang/Object.html">Object</A>[] <B>toArray</B>(<A HREF="../../java/lang/Object.html">Object</A>[]&nbsp;a)</PRE><DL>

⌨️ 快捷键说明

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