/[classpath]/classpath/java/util/List.java
ViewVC logotype

Diff of /classpath/java/util/List.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by brawer, Tue Apr 30 22:00:25 2002 UTC revision 1.10 by gnu_andrew, Thu Jul 29 20:23:18 2004 UTC
# Line 97  public interface List extends Collection Line 97  public interface List extends Collection
97     *         type     *         type
98     * @throws IllegalArgumentException if o cannot be added to this list for     * @throws IllegalArgumentException if o cannot be added to this list for
99     *         some other reason     *         some other reason
100       * @throws NullPointerException if o is null and this list doesn't support
101       *         the addition of null values.
102     */     */
103    void add(int index, Object o);    void add(int index, Object o);
104    
# Line 113  public interface List extends Collection Line 115  public interface List extends Collection
115     *         type     *         type
116     * @throws IllegalArgumentException if o cannot be added to this list for     * @throws IllegalArgumentException if o cannot be added to this list for
117     *         some other reason     *         some other reason
118       * @throws NullPointerException if o is null and this list doesn't support
119       *         the addition of null values.
120     */     */
121    boolean add(Object o);    boolean add(Object o);
122    
# Line 134  public interface List extends Collection Line 138  public interface List extends Collection
138     *         list due to its type     *         list due to its type
139     * @throws IllegalArgumentException if some element of c cannot be added     * @throws IllegalArgumentException if some element of c cannot be added
140     *         to this list for some other reason     *         to this list for some other reason
141       * @throws NullPointerException if some element of c is null and this list
142       *         doesn't support the addition of null values.
143     * @throws NullPointerException if the specified collection is null     * @throws NullPointerException if the specified collection is null
144     * @see #add(int, Object)     * @see #add(int, Object)
145     */     */
# Line 155  public interface List extends Collection Line 161  public interface List extends Collection
161     * @throws IllegalArgumentException if some element of c cannot be added     * @throws IllegalArgumentException if some element of c cannot be added
162     *         to this list for some other reason     *         to this list for some other reason
163     * @throws NullPointerException if the specified collection is null     * @throws NullPointerException if the specified collection is null
164       * @throws NullPointerException if some element of c is null and this list
165       *         doesn't support the addition of null values.
166     * @see #add(Object)     * @see #add(Object)
167     */     */
168    boolean addAll(Collection c);    boolean addAll(Collection c);
# Line 175  public interface List extends Collection Line 183  public interface List extends Collection
183     *     *
184     * @param o the element to look for     * @param o the element to look for
185     * @return true if this list contains the element     * @return true if this list contains the element
186       * @throws ClassCastException if the type of o is not a valid type
187       *         for this list.
188       * @throws NullPointerException if o is null and the list doesn't
189       *         support null values.
190     */     */
191    boolean contains(Object o);    boolean contains(Object o);
192    
# Line 184  public interface List extends Collection Line 196  public interface List extends Collection
196     * @param c the collection to test for     * @param c the collection to test for
197     * @return true if for every element o in c, contains(o) would return true     * @return true if for every element o in c, contains(o) would return true
198     * @throws NullPointerException if the collection is null     * @throws NullPointerException if the collection is null
199       * @throws ClassCastException if the type of any element in c is not a valid
200       *         type for this list.
201       * @throws NullPointerException if some element of c is null and this
202       *         list does not support null values.
203     * @see #contains(Object)     * @see #contains(Object)
204     */     */
205    boolean containsAll(Collection c);    boolean containsAll(Collection c);
# Line 240  while (i.hasNext()) Line 256  while (i.hasNext())
256     *     *
257     * @param o the object to search for     * @param o the object to search for
258     * @return the least integer n such that <code>o == null ? get(n) == null :     * @return the least integer n such that <code>o == null ? get(n) == null :
259     *         o.equals(get(n))</code>, or -1 if there is no such index     *         o.equals(get(n))</code>, or -1 if there is no such index.
260       * @throws ClassCastException if the type of o is not a valid
261       *         type for this list.
262       * @throws NullPointerException if o is null and this
263       *         list does not support null values.
264     */     */
265    int indexOf(Object o);    int indexOf(Object o);
266    
# Line 263  while (i.hasNext()) Line 283  while (i.hasNext())
283     * list.     * list.
284     *     *
285     * @return the greatest integer n such that <code>o == null ? get(n) == null     * @return the greatest integer n such that <code>o == null ? get(n) == null
286     *         : o.equals(get(n))</code>, or -1 if there is no such index     *         : o.equals(get(n))</code>, or -1 if there is no such index.
287       * @throws ClassCastException if the type of o is not a valid
288       *         type for this list.
289       * @throws NullPointerException if o is null and this
290       *         list does not support null values.
291     */     */
292    int lastIndexOf(Object o);    int lastIndexOf(Object o);
293    
# Line 310  while (i.hasNext()) Line 334  while (i.hasNext())
334     *         the list contained at least one occurrence of o     *         the list contained at least one occurrence of o
335     * @throws UnsupportedOperationException if this list does not support the     * @throws UnsupportedOperationException if this list does not support the
336     *         remove operation     *         remove operation
337       * @throws ClassCastException if the type of o is not a valid
338       *         type for this list.
339       * @throws NullPointerException if o is null and this
340       *         list does not support removing null values.
341     */     */
342    boolean remove(Object o);    boolean remove(Object o);
343    
# Line 322  while (i.hasNext()) Line 350  while (i.hasNext())
350     * @throws UnsupportedOperationException if this list does not support the     * @throws UnsupportedOperationException if this list does not support the
351     *         removeAll operation     *         removeAll operation
352     * @throws NullPointerException if the collection is null     * @throws NullPointerException if the collection is null
353       * @throws ClassCastException if the type of any element in c is not a valid
354       *         type for this list.
355       * @throws NullPointerException if some element of c is null and this
356       *         list does not support removing null values.
357     * @see #remove(Object)     * @see #remove(Object)
358     * @see #contains(Object)     * @see #contains(Object)
359     */     */
# Line 337  while (i.hasNext()) Line 369  while (i.hasNext())
369     * @throws UnsupportedOperationException if this list does not support the     * @throws UnsupportedOperationException if this list does not support the
370     *         retainAll operation     *         retainAll operation
371     * @throws NullPointerException if the collection is null     * @throws NullPointerException if the collection is null
372       * @throws ClassCastException if the type of any element in c is not a valid
373       *         type for this list.
374       * @throws NullPointerException if some element of c is null and this
375       *         list does not support retaining null values.
376     * @see #remove(Object)     * @see #remove(Object)
377     * @see #contains(Object)     * @see #contains(Object)
378     */     */
# Line 355  while (i.hasNext()) Line 391  while (i.hasNext())
391     *         type     *         type
392     * @throws IllegalArgumentException if o cannot be added to this list for     * @throws IllegalArgumentException if o cannot be added to this list for
393     *         some other reason     *         some other reason
394       * @throws NullPointerException if o is null and this
395       *         list does not support null values.
396     */     */
397    Object set(int index, Object o);    Object set(int index, Object o);
398    
# Line 381  while (i.hasNext()) Line 419  while (i.hasNext())
419     * @return a List backed by a subsection of this list     * @return a List backed by a subsection of this list
420     * @throws IndexOutOfBoundsException if fromIndex &lt; 0     * @throws IndexOutOfBoundsException if fromIndex &lt; 0
421     *         || toIndex &gt; size() || fromIndex &gt; toIndex     *         || toIndex &gt; size() || fromIndex &gt; toIndex
    * @throws IllegalArgumentException if fromIndex &gt; toIndex (according to  
    *         AbstractList). Don't you love Sun's inconsistent specifications?  
422     */     */
423    List subList(int fromIndex, int toIndex);    List subList(int fromIndex, int toIndex);
424    

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26