jdk/src/share/classes/java/util/concurrent/BlockingDeque.java
changeset 9504 a61398ab96e0
parent 9242 ef138d47df58
child 18767 6214297bf27d
equal deleted inserted replaced
9503:588cf31d584a 9504:a61398ab96e0
   398      * (or equivalently, if this deque changed as a result of the call).
   398      * (or equivalently, if this deque changed as a result of the call).
   399      *
   399      *
   400      * @param o element to be removed from this deque, if present
   400      * @param o element to be removed from this deque, if present
   401      * @return <tt>true</tt> if an element was removed as a result of this call
   401      * @return <tt>true</tt> if an element was removed as a result of this call
   402      * @throws ClassCastException if the class of the specified element
   402      * @throws ClassCastException if the class of the specified element
   403      *         is incompatible with this deque (optional)
   403      *         is incompatible with this deque
   404      * @throws NullPointerException if the specified element is null (optional)
   404      *         (<a href="../Collection.html#optional-restrictions">optional</a>)
       
   405      * @throws NullPointerException if the specified element is null
       
   406      *         (<a href="../Collection.html#optional-restrictions">optional</a>)
   405      */
   407      */
   406     boolean removeFirstOccurrence(Object o);
   408     boolean removeFirstOccurrence(Object o);
   407 
   409 
   408     /**
   410     /**
   409      * Removes the last occurrence of the specified element from this deque.
   411      * Removes the last occurrence of the specified element from this deque.
   414      * (or equivalently, if this deque changed as a result of the call).
   416      * (or equivalently, if this deque changed as a result of the call).
   415      *
   417      *
   416      * @param o element to be removed from this deque, if present
   418      * @param o element to be removed from this deque, if present
   417      * @return <tt>true</tt> if an element was removed as a result of this call
   419      * @return <tt>true</tt> if an element was removed as a result of this call
   418      * @throws ClassCastException if the class of the specified element
   420      * @throws ClassCastException if the class of the specified element
   419      *         is incompatible with this deque (optional)
   421      *         is incompatible with this deque
   420      * @throws NullPointerException if the specified element is null (optional)
   422      *         (<a href="../Collection.html#optional-restrictions">optional</a>)
       
   423      * @throws NullPointerException if the specified element is null
       
   424      *         (<a href="../Collection.html#optional-restrictions">optional</a>)
   421      */
   425      */
   422     boolean removeLastOccurrence(Object o);
   426     boolean removeLastOccurrence(Object o);
   423 
   427 
   424     // *** BlockingQueue methods ***
   428     // *** BlockingQueue methods ***
   425 
   429 
   589      * {@link #removeFirstOccurrence(Object) removeFirstOccurrence}.
   593      * {@link #removeFirstOccurrence(Object) removeFirstOccurrence}.
   590      *
   594      *
   591      * @param o element to be removed from this deque, if present
   595      * @param o element to be removed from this deque, if present
   592      * @return <tt>true</tt> if this deque changed as a result of the call
   596      * @return <tt>true</tt> if this deque changed as a result of the call
   593      * @throws ClassCastException if the class of the specified element
   597      * @throws ClassCastException if the class of the specified element
   594      *         is incompatible with this deque (optional)
   598      *         is incompatible with this deque
   595      * @throws NullPointerException if the specified element is null (optional)
   599      *         (<a href="../Collection.html#optional-restrictions">optional</a>)
       
   600      * @throws NullPointerException if the specified element is null
       
   601      *         (<a href="../Collection.html#optional-restrictions">optional</a>)
   596      */
   602      */
   597     boolean remove(Object o);
   603     boolean remove(Object o);
   598 
   604 
   599     /**
   605     /**
   600      * Returns <tt>true</tt> if this deque contains the specified element.
   606      * Returns <tt>true</tt> if this deque contains the specified element.
   602      * at least one element <tt>e</tt> such that <tt>o.equals(e)</tt>.
   608      * at least one element <tt>e</tt> such that <tt>o.equals(e)</tt>.
   603      *
   609      *
   604      * @param o object to be checked for containment in this deque
   610      * @param o object to be checked for containment in this deque
   605      * @return <tt>true</tt> if this deque contains the specified element
   611      * @return <tt>true</tt> if this deque contains the specified element
   606      * @throws ClassCastException if the class of the specified element
   612      * @throws ClassCastException if the class of the specified element
   607      *         is incompatible with this deque (optional)
   613      *         is incompatible with this deque
   608      * @throws NullPointerException if the specified element is null (optional)
   614      *         (<a href="../Collection.html#optional-restrictions">optional</a>)
       
   615      * @throws NullPointerException if the specified element is null
       
   616      *         (<a href="../Collection.html#optional-restrictions">optional</a>)
   609      */
   617      */
   610     public boolean contains(Object o);
   618     public boolean contains(Object o);
   611 
   619 
   612     /**
   620     /**
   613      * Returns the number of elements in this deque.
   621      * Returns the number of elements in this deque.