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.41 by dl, Wed Jan 16 15:06:10 2013 UTC vs.
Revision 1.43 by jsr166, Wed Jan 16 21:25:33 2013 UTC

# Line 47 | Line 47 | import java.util.function.Block;
47   * {@link Stack} when used as a stack, and faster than {@link LinkedList}
48   * when used as a queue.
49   *
50 < * <p>Most <tt>ArrayDeque</tt> operations run in amortized constant time.
50 > * <p>Most {@code ArrayDeque} operations run in amortized constant time.
51   * Exceptions include {@link #remove(Object) remove}, {@link
52   * #removeFirstOccurrence removeFirstOccurrence}, {@link #removeLastOccurrence
53   * removeLastOccurrence}, {@link #contains contains}, {@link #iterator
54   * iterator.remove()}, and the bulk operations, all of which run in linear
55   * time.
56   *
57 < * <p>The iterators returned by this class's <tt>iterator</tt> method are
57 > * <p>The iterators returned by this class's {@code iterator} method are
58   * <i>fail-fast</i>: If the deque is modified at any time after the iterator
59 < * is created, in any way except through the iterator's own <tt>remove</tt>
59 > * is created, in any way except through the iterator's own {@code remove}
60   * method, the iterator will generally throw a {@link
61   * ConcurrentModificationException}.  Thus, in the face of concurrent
62   * modification, the iterator fails quickly and cleanly, rather than risking
# Line 66 | Line 66 | import java.util.function.Block;
66   * <p>Note that the fail-fast behavior of an iterator cannot be guaranteed
67   * as it is, generally speaking, impossible to make any hard guarantees in the
68   * presence of unsynchronized concurrent modification.  Fail-fast iterators
69 < * throw <tt>ConcurrentModificationException</tt> on a best-effort basis.
69 > * throw {@code ConcurrentModificationException} on a best-effort basis.
70   * Therefore, it would be wrong to write a program that depended on this
71   * exception for its correctness: <i>the fail-fast behavior of iterators
72   * should be used only to detect bugs.</i>
# Line 974 | Line 974 | public class ArrayDeque<E> extends Abstr
974          public void remove() { throw new UnsupportedOperationException(); }
975  
976          // Other spliterator methods
977 <        public long estimateSize() {
977 >        public long estimateSize() {
978              int n = fence - index;
979              if (n < 0)
980                  n += array.length;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines