📄 abstractlist.html
字号:
</TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/AbstractList.html#indexOf(java.lang.Object)">indexOf</A></B>(<A HREF="../../java/lang/Object.html">Object</A> o)</CODE><BR> Returns the index in this list of the first occurence of the specified element, or -1 if the list does not contain this element.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/util/Iterator.html">Iterator</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/AbstractList.html#iterator()">iterator</A></B>()</CODE><BR> 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> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/AbstractList.html#lastIndexOf(java.lang.Object)">lastIndexOf</A></B>(<A HREF="../../java/lang/Object.html">Object</A> o)</CODE><BR> Returns the index in this list of the last occurence of the specified element, or -1 if the list does not contain this element.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/util/ListIterator.html">ListIterator</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/AbstractList.html#listIterator()">listIterator</A></B>()</CODE><BR> Returns an 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> <A HREF="../../java/util/ListIterator.html">ListIterator</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/AbstractList.html#listIterator(int)">listIterator</A></B>(int index)</CODE><BR> Returns a list iterator of the elements in this list (in proper sequence), starting at the specified position in the list.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/AbstractList.html#remove(int)">remove</A></B>(int index)</CODE><BR> 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>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/AbstractList.html#removeRange(int, int)">removeRange</A></B>(int fromIndex, int toIndex)</CODE><BR> Removes from this list all of the elements whose index is between <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> <A HREF="../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/AbstractList.html#set(int, java.lang.Object)">set</A></B>(int index, <A HREF="../../java/lang/Object.html">Object</A> element)</CODE><BR> 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> <A HREF="../../java/util/List.html">List</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/util/AbstractList.html#subList(int, int)">subList</A></B>(int fromIndex, int toIndex)</CODE><BR> Returns a view of the portion of this list between <tt>fromIndex</tt>, inclusive, and <tt>toIndex</tt>, exclusive.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.util.AbstractCollection"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.util.<A HREF="../../java/util/AbstractCollection.html">AbstractCollection</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/util/AbstractCollection.html#addAll(java.util.Collection)">addAll</A>, <A HREF="../../java/util/AbstractCollection.html#contains(java.lang.Object)">contains</A>, <A HREF="../../java/util/AbstractCollection.html#containsAll(java.util.Collection)">containsAll</A>, <A HREF="../../java/util/AbstractCollection.html#isEmpty()">isEmpty</A>, <A HREF="../../java/util/AbstractCollection.html#remove(java.lang.Object)">remove</A>, <A HREF="../../java/util/AbstractCollection.html#removeAll(java.util.Collection)">removeAll</A>, <A HREF="../../java/util/AbstractCollection.html#retainAll(java.util.Collection)">retainAll</A>, <A HREF="../../java/util/AbstractCollection.html#size()">size</A>, <A HREF="../../java/util/AbstractCollection.html#toArray()">toArray</A>, <A HREF="../../java/util/AbstractCollection.html#toArray(java.lang.Object[])">toArray</A>, <A HREF="../../java/util/AbstractCollection.html#toString()">toString</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="../../java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/lang/Object.html#clone()">clone</A>, <A HREF="../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.util.List"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface java.util.<A HREF="../../java/util/List.html">List</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/util/List.html#addAll(java.util.Collection)">addAll</A>, <A HREF="../../java/util/List.html#contains(java.lang.Object)">contains</A>, <A HREF="../../java/util/List.html#containsAll(java.util.Collection)">containsAll</A>, <A HREF="../../java/util/List.html#isEmpty()">isEmpty</A>, <A HREF="../../java/util/List.html#remove(java.lang.Object)">remove</A>, <A HREF="../../java/util/List.html#removeAll(java.util.Collection)">removeAll</A>, <A HREF="../../java/util/List.html#retainAll(java.util.Collection)">retainAll</A>, <A HREF="../../java/util/List.html#size()">size</A>, <A HREF="../../java/util/List.html#toArray()">toArray</A>, <A HREF="../../java/util/List.html#toArray(java.lang.Object[])">toArray</A></CODE></TD></TR></TABLE> <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="modCount"><!-- --></A><H3>modCount</H3><PRE>protected transient int <B>modCount</B></PRE><DL><DD>The number of times this list has been <i>structurally modified</i>. Structural modifications are those that change the size of the list, or otherwise perturb it in such a fashion that iterations in progress may yield incorrect results.<p> This field is used by the iterator and list iterator implementation returned by the <tt>iterator</tt> and <tt>listIterator</tt> methods. If the value of this field changes unexpectedly, the iterator (or list iterator) will throw a <tt>ConcurrentModificationException</tt> in response to the <tt>next</tt>, <tt>remove</tt>, <tt>previous</tt>, <tt>set</tt> or <tt>add</tt> operations. This provides <i>fail-fast</i> behavior, rather than non-deterministic behavior in the face of concurrent modification during iteration.<p> <b>Use of this field by subclasses is optional.</b> If a subclass wishes to provide fail-fast iterators (and list iterators), then it merely has to increment this field in its <tt>add(int, Object)</tt> and <tt>remove(int)</tt> methods (and any other methods that it overrides that result in structural modifications to the list). A single call to <tt>add(int, Object)</tt> or <tt>remove(int)</tt> must add no more than one to this field, or the iterators (and list iterators) will throw bogus <tt>ConcurrentModificationExceptions</tt>. If an implementation does not wish to provide fail-fast iterators, this field may be ignored.</DL><!-- ========= 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="AbstractList()"><!-- --></A><H3>AbstractList</H3><PRE>protected <B>AbstractList</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="add(java.lang.Object)"><!-- --></A><H3>add</H3><PRE>public boolean <B>add</B>(<A HREF="../../java/lang/Object.html">Object</A> o)</PRE><DL><DD>Appends the specified element to the end of this List (optional operation). <p> This implementation calls <tt>add(size(), o)</tt>.<p> Note that this implementation throws an <tt>UnsupportedOperationException</tt> unless <tt>add(int, Object)</tt> is overridden.<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/AbstractCollection.html#add(java.lang.Object)">add</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 appended to this list.<DT><B>Returns:</B><DD><tt>true</tt> (as per the general contract of <tt>Collection.add</tt>).<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/UnsupportedOperationException.html">UnsupportedOperationException</A></CODE> - if the <tt>add</tt> method is not supported by this Set.<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 set.<DD><CODE><A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - some aspect of this element prevents it from being added to this collection.</DL></DD></DL><HR><A NAME="get(int)"><!-- --></A><H3>get</H3><PRE>public abstract <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.<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></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 given 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>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -