📄 abstractsequentiallist.html
字号:
<!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="AbstractSequentialList()"><!-- --></A><H3>AbstractSequentialList</H3><PRE>protected <B>AbstractSequentialList</B>()</PRE><DL><DD>Sole constructor. (For invocation by subclass constructors, typically implicit.)</DL><!-- ============ 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="get(int)"><!-- --></A><H3>get</H3><PRE>public <A HREF="../../java/lang/Object.html">Object</A> <B>get</B>(int index)</PRE><DL><DD>Returns the element at the specified position in this list. <p> This implementation first gets a list iterator pointing to the indexed element (with <tt>listIterator(index)</tt>). Then, it gets the element using <tt>ListIterator.next</tt> and returns it.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/util/AbstractList.html#get(int)">get</A></CODE> in class <CODE><A HREF="../../java/util/AbstractList.html">AbstractList</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the element at the specified position in this list. * @param index index of element to return. * @throws IndexOutOfBoundsException if the specified index is out of range (<tt>index < 0 || index >= size()</tt>).</DL></DD></DL><HR><A NAME="set(int, java.lang.Object)"><!-- --></A><H3>set</H3><PRE>public <A HREF="../../java/lang/Object.html">Object</A> <B>set</B>(int index, <A HREF="../../java/lang/Object.html">Object</A> element)</PRE><DL><DD>Replaces the element at the specified position in this list with the specified element. <p> This implementation first gets a list iterator pointing to the indexed element (with <tt>listIterator(index)</tt>). Then, it gets the current element using <tt>ListIterator.next</tt> and replaces it with <tt>ListIterator.set</tt>.<p> Note that this implementation will throw an UnsupportedOperationException if list iterator does not implement the set operation.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/util/AbstractList.html#set(int, java.lang.Object)">set</A></CODE> in class <CODE><A HREF="../../java/util/AbstractList.html">AbstractList</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - index of element to replace.<DD><CODE>element</CODE> - element to be stored at the specified position.<DT><B>Returns:</B><DD>the element previously at the specified position.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/UnsupportedOperationException.html">UnsupportedOperationException</A></CODE> - set is not supported by this list.<DD><CODE><A HREF="../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - this list does not permit null elements and one of the elements of <code>c</code> is null.<DD><CODE><A HREF="../../java/lang/ClassCastException.html">ClassCastException</A></CODE> - class of the specified element prevents it from being added to this list.<DD><CODE><A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - some aspect of the specified element prevents it from being added to this list.<DD><CODE><A HREF="../../java/lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</A></CODE> - index out of range <tt>(index < 0 || index >= size()</tt>).<DD><CODE><A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - fromIndex > toIndex.</DL></DD></DL><HR><A NAME="add(int, java.lang.Object)"><!-- --></A><H3>add</H3><PRE>public void <B>add</B>(int index, <A HREF="../../java/lang/Object.html">Object</A> element)</PRE><DL><DD>Inserts the specified element at the specified position in this list. Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).<p> This implementation first gets a list iterator pointing to the indexed element (with <tt>listIterator(index)</tt>). Then, it inserts the specified element with <tt>ListIterator.add</tt>.<p> Note that this implementation will throw an <tt>UnsupportedOperationException</tt> if list iterator does not implement the <tt>add</tt> operation.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/util/AbstractList.html#add(int, 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>index</CODE> - index at which the specified element is to be inserted.<DD><CODE>element</CODE> - element to be inserted.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/UnsupportedOperationException.html">UnsupportedOperationException</A></CODE> - if the <tt>add</tt> operation is not supported by this list.<DD><CODE><A HREF="../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - this list does not permit <tt>null</tt> elements and one of the elements of <code>c</code> is <tt>null</tt>.<DD><CODE><A HREF="../../java/lang/ClassCastException.html">ClassCastException</A></CODE> - if the class of the specified element prevents it from being added to this list.<DD><CODE><A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if some aspect of the specified element prevents it from being added to this list.<DD><CODE><A HREF="../../java/lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</A></CODE> - if the specified index is out of range (<tt>index < 0 || index > size()</tt>).</DL></DD></DL><HR><A NAME="remove(int)"><!-- --></A><H3>remove</H3><PRE>public <A HREF="../../java/lang/Object.html">Object</A> <B>remove</B>(int index)</PRE><DL><DD>Removes the element at the specified position in this list. Shifts any subsequent elements to the left (subtracts one from their indices).<p> This implementation first gets a list iterator pointing to the indexed element (with <tt>listIterator(index)</tt>). Then, it removes the element with <tt>ListIterator.remove</tt>.<p> Note that this implementation will throw an <tt>UnsupportedOperationException</tt> if list iterator does not implement the <tt>remove</tt> operation.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/util/AbstractList.html#remove(int)">remove</A></CODE> in class <CODE><A HREF="../../java/util/AbstractList.html">AbstractList</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - index of the element to be removed from the List.<DT><B>Returns:</B><DD>the element that was removed from the list.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/UnsupportedOperationException.html">UnsupportedOperationException</A></CODE> - if the <tt>remove</tt> operation is not supported by this list.<DD><CODE><A HREF="../../java/lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</A></CODE> - if the specified index is out of range (index < 0 || index >= size()).</DL></DD></DL><HR><A NAME="addAll(int, java.util.Collection)"><!-- --></A><H3>addAll</H3><PRE>public boolean <B>addAll</B>(int index, <A HREF="../../java/util/Collection.html">Collection</A> c)</PRE><DL><DD>Inserts all of the elements in in the specified collection into this list 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. The behavior of this operation is unspecified if the specified collection is modified while the operation is in progress. (Note that this will occur if the specified collection is this list, and it's nonempty.) Optional operation.<p> This implementation gets an iterator over the specified collection and a list iterator over this list pointing to the indexed element (with <tt>listIterator(index)</tt>). Then, it iterates over the specified collection, inserting the elements obtained from the iterator into this list, one at a time, using <tt>ListIterator.add</tt> followed by <tt>ListIterator.next</tt> (to skip over the added element).<p> Note that this implementation will throw an <tt>UnsupportedOperationException</tt> if the list iterator returned by the <tt>listIterator</tt> method does not implement the <tt>add</tt> operation.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/util/AbstractList.html#addAll(int, java.util.Collection)">addAll</A></CODE> in class <CODE><A HREF="../../java/util/AbstractList.html">AbstractList</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>Returns:</B><DD><tt>true</tt> if this list changed as a result of the call.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/UnsupportedOperationException.html">UnsupportedOperationException</A></CODE> - if the <tt>addAll</tt> operation is not supported by this list.<DD><CODE><A HREF="../../java/lang/NullPointerException.html">NullPointerException</A></CODE> - this list does not permit <tt>null</tt> elements and one of the elements of the specified collection is <tt>null</tt>.<DD><CODE><A HREF="../../java/lang/ClassCastException.html">ClassCastException</A></CODE> - if the class of the specified element prevents it from being added to this list.<DD><CODE><A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if some aspect of the specified element prevents it from being added to this list.<DD><CODE><A HREF="../../java/lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</A></CODE> - if the specified index is out of range (<tt>index < 0 || index > size()</tt>).</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).<p> This implementation merely returns a list iterator over the list.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/util/AbstractList.html#iterator()">iterator</A></CODE> in class <CODE><A HREF="../../java/util/AbstractList.html">AbstractList</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="listIterator(int)"><!-- --></A><H3>listIterator</H3><PRE>public abstract <A HREF="../../java/util/ListIterator.html">ListIterator</A> <B>listIterator</B>(int index)</PRE><DL><DD>Returns a list iterator over the elements in this list (in proper sequence).<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/util/AbstractList.html#listIterator(int)">listIterator</A></CODE> in class <CODE><A HREF="../../java/util/AbstractList.html">AbstractList</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a list iterator over the elements in this list (in proper sequence).</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AbstractSequentialList.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../java/util/AbstractMap.html"><B>PREV CLASS</B></A> <A HREF="../../java/util/AbstractSet.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="AbstractSequentialList.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#fields_inherited_from_class_java.util.AbstractList">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -