ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/AbstractList.java
(Generate patch)

Comparing jsr166/src/main/java/util/AbstractList.java (file contents):
Revision 1.13 by jsr166, Mon Jun 26 01:02:38 2006 UTC vs.
Revision 1.14 by jsr166, Mon Jun 26 01:08:01 2006 UTC

# Line 250 | Line 250 | public abstract class AbstractList<E> ex
250      // Iterators
251  
252      /**
253 <     * Returns an iterator over the elements in this list in proper
254 <     * sequence.
253 >     * Returns an iterator over the elements in this list in proper sequence.
254       *
255       * <p>This implementation returns a straightforward implementation of the
256       * iterator interface, relying on the backing list's {@code size()},
# Line 292 | Line 291 | public abstract class AbstractList<E> ex
291       * {@code ListIterator} interface that extends the implementation of the
292       * {@code Iterator} interface returned by the {@code iterator()} method.
293       * The {@code ListIterator} implementation relies on the backing list's
294 <     * {@code get(int)}, {@code set(int, E)}, {@code add(int, Object)}
294 >     * {@code get(int)}, {@code set(int, E)}, {@code add(int, E)}
295       * and {@code remove(int)} methods.
296       *
297       * <p>Note that the list iterator returned by this implementation will
# Line 444 | Line 443 | public abstract class AbstractList<E> ex
443       * If this list implements {@code RandomAccess} the returned list will
444       * be an instance of the subclass that implements {@code RandomAccess}.
445       *
446 <     * <p>The subclass's {@code set(int, Object)}, {@code get(int)},
447 <     * {@code add(int, Object)}, {@code remove(int)}, {@code addAll(int,
446 >     * <p>The subclass's {@code set(int, E)}, {@code get(int)},
447 >     * {@code add(int, E)}, {@code remove(int)}, {@code addAll(int,
448       * Collection)} and {@code removeRange(int, int)} methods all
449       * delegate to the corresponding methods on the backing abstract list,
450       * after bounds-checking the index and adjusting for the offset.  The
# Line 463 | Line 462 | public abstract class AbstractList<E> ex
462       * {@code ConcurrentModificationException} if it is not.
463       *
464       * @throws IndexOutOfBoundsException endpoint index value out of range
465 <     *         {@code (fromIndex &lt; 0 || toIndex &gt; size)}
465 >     *         {@code (fromIndex < 0 || toIndex > size)}
466       * @throws IllegalArgumentException if the endpoint indices are out of order
467 <     *         {@code (fromIndex &gt; toIndex)}
467 >     *         {@code (fromIndex > toIndex)}
468       */
469      public List<E> subList(int fromIndex, int toIndex) {
470          return (this instanceof RandomAccess ?
# Line 580 | Line 579 | public abstract class AbstractList<E> ex
579       *
580       * <p><b>Use of this field by subclasses is optional.</b> If a subclass
581       * wishes to provide fail-fast iterators (and list iterators), then it
582 <     * merely has to increment this field in its {@code add(int, Object)} and
582 >     * merely has to increment this field in its {@code add(int, E)} and
583       * {@code remove(int)} methods (and any other methods that it overrides
584       * that result in structural modifications to the list).  A single call to
585 <     * {@code add(int, Object)} or {@code remove(int)} must add no more than
585 >     * {@code add(int, E)} or {@code remove(int)} must add no more than
586       * one to this field, or the iterators (and list iterators) will throw
587       * bogus {@code ConcurrentModificationExceptions}.  If an implementation
588       * does not wish to provide fail-fast iterators, this field may be

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines