jdk/src/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java
changeset 7976 f273c0d04215
parent 7518 0282db800fe1
child 8544 225896f7b33c
equal deleted inserted replaced
7975:f0de2d05f34c 7976:f273c0d04215
   267 
   267 
   268     // Have to override just to update the javadoc
   268     // Have to override just to update the javadoc
   269 
   269 
   270     /**
   270     /**
   271      * Inserts the specified element at the tail of this queue.
   271      * Inserts the specified element at the tail of this queue.
       
   272      * As the queue is unbounded, this method will never throw
       
   273      * {@link IllegalStateException} or return {@code false}.
   272      *
   274      *
   273      * @return {@code true} (as specified by {@link Collection#add})
   275      * @return {@code true} (as specified by {@link Collection#add})
   274      * @throws NullPointerException if the specified element is null
   276      * @throws NullPointerException if the specified element is null
   275      */
   277      */
   276     public boolean add(E e) {
   278     public boolean add(E e) {
   296         return (p == next) ? head : next;
   298         return (p == next) ? head : next;
   297     }
   299     }
   298 
   300 
   299     /**
   301     /**
   300      * Inserts the specified element at the tail of this queue.
   302      * Inserts the specified element at the tail of this queue.
       
   303      * As the queue is unbounded, this method will never return {@code false}.
   301      *
   304      *
   302      * @return {@code true} (as specified by {@link Queue#offer})
   305      * @return {@code true} (as specified by {@link Queue#offer})
   303      * @throws NullPointerException if the specified element is null
   306      * @throws NullPointerException if the specified element is null
   304      */
   307      */
   305     public boolean offer(E e) {
   308     public boolean offer(E e) {