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

📄 linkedlist.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<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="getFirst()"><!-- --></A><H3>getFirst</H3><PRE>public <A HREF="../../java/lang/Object.html">Object</A> <B>getFirst</B>()</PRE><DL><DD>Returns the first element in this list.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the first element in this list.</DL></DD></DL><HR><A NAME="getLast()"><!-- --></A><H3>getLast</H3><PRE>public <A HREF="../../java/lang/Object.html">Object</A> <B>getLast</B>()</PRE><DL><DD>Returns the last element in this list.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the last element in this list.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/util/NoSuchElementException.html">NoSuchElementException</A></CODE> - if this list is empty.</DL></DD></DL><HR><A NAME="removeFirst()"><!-- --></A><H3>removeFirst</H3><PRE>public <A HREF="../../java/lang/Object.html">Object</A> <B>removeFirst</B>()</PRE><DL><DD>Removes and returns the first element from this list.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the first element from this list.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/util/NoSuchElementException.html">NoSuchElementException</A></CODE> - if this list is empty.</DL></DD></DL><HR><A NAME="removeLast()"><!-- --></A><H3>removeLast</H3><PRE>public <A HREF="../../java/lang/Object.html">Object</A> <B>removeLast</B>()</PRE><DL><DD>Removes and returns the last element from this list.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the last element from this list.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/util/NoSuchElementException.html">NoSuchElementException</A></CODE> - if this list is empty.</DL></DD></DL><HR><A NAME="addFirst(java.lang.Object)"><!-- --></A><H3>addFirst</H3><PRE>public void <B>addFirst</B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;o)</PRE><DL><DD>Inserts the given element at the beginning of this list.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>o</CODE> - the element to be inserted at the beginning of this list.</DL></DD></DL><HR><A NAME="addLast(java.lang.Object)"><!-- --></A><H3>addLast</H3><PRE>public void <B>addLast</B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;o)</PRE><DL><DD>Appends the given element to the end of this list.  (Identical in function to the <tt>add</tt> method; included only for consistency.)<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>o</CODE> - the element to be inserted at the end of this list.</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 ? e==null : o.equals(e))</tt>.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../java/util/List.html#contains(java.lang.Object)">contains</A></CODE> in interface <CODE><A HREF="../../java/util/List.html">List</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/util/AbstractCollection.html#contains(java.lang.Object)">contains</A></CODE> in class <CODE><A HREF="../../java/util/AbstractCollection.html">AbstractCollection</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="size()"><!-- --></A><H3>size</H3><PRE>public int <B>size</B>()</PRE><DL><DD>Returns the number of elements in this list.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../java/util/List.html#size()">size</A></CODE> in interface <CODE><A HREF="../../java/util/List.html">List</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/util/AbstractCollection.html#size()">size</A></CODE> in class <CODE><A HREF="../../java/util/AbstractCollection.html">AbstractCollection</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the number of elements in this list.</DL></DD></DL><HR><A NAME="add(java.lang.Object)"><!-- --></A><H3>add</H3><PRE>public boolean <B>add</B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;o)</PRE><DL><DD>Appends the specified element to the end of this list.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../java/util/List.html#add(java.lang.Object)">add</A></CODE> in interface <CODE><A HREF="../../java/util/List.html">List</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/util/AbstractList.html#add(java.lang.Object)">add</A></CODE> in class <CODE><A HREF="../../java/util/AbstractList.html">AbstractList</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>o</CODE> - element to be appended to this list.<DT><B>Returns:</B><DD><tt>true</tt> (as per the general contract of <tt>Collection.add</tt>).</DL></DD></DL><HR><A NAME="remove(java.lang.Object)"><!-- --></A><H3>remove</H3><PRE>public boolean <B>remove</B>(<A HREF="../../java/lang/Object.html">Object</A>&nbsp;o)</PRE><DL><DD>Removes the first occurrence of the specified element in this list.  If the list does not contain the element, it is unchanged.  More formally, removes the element with the lowest index <tt>i</tt> such that <tt>(o==null ? get(i)==null : o.equals(get(i)))</tt> (if such an element exists).<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../java/util/List.html#remove(java.lang.Object)">remove</A></CODE> in interface <CODE><A HREF="../../java/util/List.html">List</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/util/AbstractCollection.html#remove(java.lang.Object)">remove</A></CODE> in class <CODE><A HREF="../../java/util/AbstractCollection.html">AbstractCollection</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>o</CODE> - element to be removed from this list, if present.<DT><B>Returns:</B><DD><tt>true</tt> if the list contained the specified element.</DL></DD></DL><HR><A NAME="addAll(java.util.Collection)"><!-- --></A><H3>addAll</H3><PRE>public boolean <B>addAll</B>(<A HREF="../../java/util/Collection.html">Collection</A>&nbsp;c)</PRE><DL><DD>Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator.  The behavior of this operation is undefined if the specified collection is modified while the operation is in progress.  (This implies that the behavior of this call is undefined if the specified Collection is this list, and this list is nonempty.)<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../java/util/List.html#addAll(java.util.Collection)">addAll</A></CODE> in interface <CODE><A HREF="../../java/util/List.html">List</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/util/AbstractCollection.html#addAll(java.util.Collection)">addAll</A></CODE> in class <CODE><A HREF="../../java/util/AbstractCollection.html">AbstractCollection</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>c</CODE> - the elements to be inserted into this list.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</A></CODE> - if the specified index is out of         range (<tt>index &lt; 0 || index &gt; size()</tt>).</DL></DD></DL><HR><A NAME="addAll(int, java.util.Collection)"><!-- --></A><H3>addAll</H3><PRE>public boolean <B>addAll</B>(int&nbsp;index,                      <A HREF="../../java/util/Collection.html">Collection</A>&nbsp;c)</PRE><DL><DD>Inserts all of the elements in the specified collection into this list, starting at the specified position.  Shifts the element currently at that position (if any) and any subsequent elements to the right (increases their indices).  The new elements will appear in the list in the order that they are returned by the specified collection's iterator.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../java/util/List.html#addAll(int, java.util.Collection)">addAll</A></CODE> in interface <CODE><A HREF="../../java/util/List.html">List</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/util/AbstractSequentialList.html#addAll(int, java.util.Collection)">addAll</A></CODE> in class <CODE><A HREF="../../java/util/AbstractSequentialList.html">AbstractSequentialList</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - index at which to insert first element		    from the specified collection.<DD><CODE>c</CODE> - elements to be inserted into this list.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</A></CODE> - if the specified index is out of            range (<tt>index &lt; 0 || index &gt; size()</tt>).</DL></DD></DL><HR><A NAME="clear()"><!-- --></A><H3>clear</H3><PRE>public void <B>clear</B>()</PRE><DL><DD>Removes all of the elements from this list.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../java/util/List.html#clear()">clear</A></CODE> in interface <CODE><A HREF="../../java/util/List.html">List</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/util/AbstractList.html#clear()">clear</A></CODE> in class <CODE><A HREF="../../java/util/AbstractList.html">AbstractList</A></CODE></DL></DD><DD>Following copied from interface: <CODE>java.util.List</CODE></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/UnsupportedOperationException.html">UnsupportedOperationException</A></CODE> - if the <tt>clear</tt> method is 		  not supported by this list.</DL></DD></DL><HR><A NAME="get(int)"><!-- --></A><H3>get</H3><PRE>public <A HREF="../../java/lang/Object.html">Object</A> <B>get</B>(int&nbsp;index)</PRE><DL><DD>Returns the element at the specified position in this list.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../java/util/List.html#get(int)">get</A></CODE> in interface <CODE><A HREF="../../java/util/List.html">List</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/util/AbstractSequentialList.html#get(int)">get</A></CODE> in class <CODE><A HREF="../../java/util/AbstractSequentialList.html">AbstractSequentialList</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - index of element to return.<DT><B>Returns:</B><DD>the element at the specified position in this list.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</A></CODE> - if the specified index is is out of range (<tt>index &lt; 0 || index &gt;= size()</tt>).</DL></DD></DL>

⌨️ 快捷键说明

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