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

Comparing jsr166/src/main/java/util/ArrayDeque.java (file contents):
Revision 1.6 by dl, Tue Mar 22 16:48:32 2005 UTC vs.
Revision 1.7 by jsr166, Tue Apr 26 19:54:03 2005 UTC

# Line 24 | Line 24 | import java.io.*;
24   *
25   * <p>The iterators returned by this class's <tt>iterator</tt> method are
26   * <i>fail-fast</i>: If the deque is modified at any time after the iterator
27 < * is created, in any way except through the iterator's own remove method, the
28 < * iterator will generally throw a {@link ConcurrentModificationException}.
29 < * Thus, in the face of concurrent modification, the iterator fails quickly
30 < * and cleanly, rather than risking arbitrary, non-deterministic behavior at
31 < * an undetermined time in the future.
27 > * is created, in any way except through the iterator's own <tt>remove</tt>
28 > * method, the iterator will generally throw a {@link
29 > * ConcurrentModificationException}.  Thus, in the face of concurrent
30 > * modification, the iterator fails quickly and cleanly, rather than risking
31 > * arbitrary, non-deterministic behavior at an undetermined time in the
32 > * future.
33   *
34   * <p>Note that the fail-fast behavior of an iterator cannot be guaranteed
35   * as it is, generally speaking, impossible to make any hard guarantees in the
# Line 129 | Line 130 | public class ArrayDeque<E> extends Abstr
130      }
131  
132      /**
133 <     * Copy the elements from our element array into the specified array,
133 >     * Copies the elements from our element array into the specified array,
134       * in order (from first to last element in the deque).  It is assumed
135       * that the array is large enough to hold all elements in the deque.
136       *
# Line 520 | Line 521 | public class ArrayDeque<E> extends Abstr
521      }
522  
523      /**
524 <     * Remove the element at the specified position in the elements array,
524 >     * Removes the element at the specified position in the elements array,
525       * adjusting head, tail, and size as necessary.  This can result in
526       * motion of elements backwards or forwards in the array.
527       *
# Line 558 | Line 559 | public class ArrayDeque<E> extends Abstr
559      }
560  
561      /**
562 <     * Returns <tt>true</tt> if this collection contains no elements.<p>
562 >     * Returns <tt>true</tt> if this deque contains no elements.<p>
563       *
564 <     * @return <tt>true</tt> if this collection contains no elements.
564 >     * @return <tt>true</tt> if this deque contains no elements.
565       */
566      public boolean isEmpty() {
567          return head == tail;
# Line 659 | Line 660 | public class ArrayDeque<E> extends Abstr
660  
661      /**
662       * Removes all of the elements from this deque.
663 +     * The deque will be empty after this call returns.
664       */
665      public void clear() {
666          int h = head;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines