src/share/classes/java/util/concurrent/LinkedBlockingDeque.java

Print this page

        

*** 1002,1017 **** } /** * Returns an iterator over the elements in this deque in proper sequence. * The elements will be returned in order from first (head) to last (tail). ! * The returned {@code Iterator} is a "weakly consistent" iterator that * will never throw {@link java.util.ConcurrentModificationException ! * ConcurrentModificationException}, ! * and guarantees to traverse elements as they existed upon ! * construction of the iterator, and may (but is not guaranteed to) ! * reflect any modifications subsequent to construction. * * @return an iterator over the elements in this deque in proper sequence */ public Iterator<E> iterator() { return new Itr(); --- 1002,1018 ---- } /** * Returns an iterator over the elements in this deque in proper sequence. * The elements will be returned in order from first (head) to last (tail). ! * ! * <p>The returned iterator is a "weakly consistent" iterator that * will never throw {@link java.util.ConcurrentModificationException ! * ConcurrentModificationException}, and guarantees to traverse ! * elements as they existed upon construction of the iterator, and ! * may (but is not guaranteed to) reflect any modifications ! * subsequent to construction. * * @return an iterator over the elements in this deque in proper sequence */ public Iterator<E> iterator() { return new Itr();
*** 1019,1034 **** /** * Returns an iterator over the elements in this deque in reverse * sequential order. The elements will be returned in order from * last (tail) to first (head). ! * The returned {@code Iterator} is a "weakly consistent" iterator that * will never throw {@link java.util.ConcurrentModificationException ! * ConcurrentModificationException}, ! * and guarantees to traverse elements as they existed upon ! * construction of the iterator, and may (but is not guaranteed to) ! * reflect any modifications subsequent to construction. */ public Iterator<E> descendingIterator() { return new DescendingItr(); } --- 1020,1038 ---- /** * Returns an iterator over the elements in this deque in reverse * sequential order. The elements will be returned in order from * last (tail) to first (head). ! * ! * <p>The returned iterator is a "weakly consistent" iterator that * will never throw {@link java.util.ConcurrentModificationException ! * ConcurrentModificationException}, and guarantees to traverse ! * elements as they existed upon construction of the iterator, and ! * may (but is not guaranteed to) reflect any modifications ! * subsequent to construction. ! * ! * @return an iterator over the elements in this deque in reverse order */ public Iterator<E> descendingIterator() { return new DescendingItr(); }