Print this page


Split Close
Expand all
Collapse all
          --- old/src/share/classes/java/util/concurrent/LinkedBlockingDeque.java
          +++ new/src/share/classes/java/util/concurrent/LinkedBlockingDeque.java
↓ open down ↓ 996 lines elided ↑ open up ↑
 997  997              count = 0;
 998  998              notFull.signalAll();
 999  999          } finally {
1000 1000              lock.unlock();
1001 1001          }
1002 1002      }
1003 1003  
1004 1004      /**
1005 1005       * Returns an iterator over the elements in this deque in proper sequence.
1006 1006       * The elements will be returned in order from first (head) to last (tail).
1007      -     * The returned {@code Iterator} is a "weakly consistent" iterator that
     1007 +     *
     1008 +     * <p>The returned iterator is a "weakly consistent" iterator that
1008 1009       * will never throw {@link java.util.ConcurrentModificationException
1009      -     * ConcurrentModificationException},
1010      -     * and guarantees to traverse elements as they existed upon
1011      -     * construction of the iterator, and may (but is not guaranteed to)
1012      -     * reflect any modifications subsequent to construction.
     1010 +     * ConcurrentModificationException}, and guarantees to traverse
     1011 +     * elements as they existed upon construction of the iterator, and
     1012 +     * may (but is not guaranteed to) reflect any modifications
     1013 +     * subsequent to construction.
1013 1014       *
1014 1015       * @return an iterator over the elements in this deque in proper sequence
1015 1016       */
1016 1017      public Iterator<E> iterator() {
1017 1018          return new Itr();
1018 1019      }
1019 1020  
1020 1021      /**
1021 1022       * Returns an iterator over the elements in this deque in reverse
1022 1023       * sequential order.  The elements will be returned in order from
1023 1024       * last (tail) to first (head).
1024      -     * The returned {@code Iterator} is a "weakly consistent" iterator that
     1025 +     *
     1026 +     * <p>The returned iterator is a "weakly consistent" iterator that
1025 1027       * will never throw {@link java.util.ConcurrentModificationException
1026      -     * ConcurrentModificationException},
1027      -     * and guarantees to traverse elements as they existed upon
1028      -     * construction of the iterator, and may (but is not guaranteed to)
1029      -     * reflect any modifications subsequent to construction.
     1028 +     * ConcurrentModificationException}, and guarantees to traverse
     1029 +     * elements as they existed upon construction of the iterator, and
     1030 +     * may (but is not guaranteed to) reflect any modifications
     1031 +     * subsequent to construction.
     1032 +     *
     1033 +     * @return an iterator over the elements in this deque in reverse order
1030 1034       */
1031 1035      public Iterator<E> descendingIterator() {
1032 1036          return new DescendingItr();
1033 1037      }
1034 1038  
1035 1039      /**
1036 1040       * Base class for Iterators for LinkedBlockingDeque
1037 1041       */
1038 1042      private abstract class AbstractItr implements Iterator<E> {
1039 1043          /**
↓ open down ↓ 155 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX