[cvs] / jsr166 / src / main / java / util / Deque.java Repository:
ViewVC logotype

Diff of /jsr166/src/main/java/util/Deque.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8, Sat May 14 02:22:28 2005 UTC revision 1.9, Mon May 16 04:58:20 2005 UTC
# Line 172  Line 172 
172       * @param e the element to add       * @param e the element to add
173       * @throws IllegalStateException if the element cannot be added at this       * @throws IllegalStateException if the element cannot be added at this
174       *         time due to capacity restrictions       *         time due to capacity restrictions
      * @throws NullPointerException if the specified element is null and this  
      *         deque does not permit null elements  
175       * @throws ClassCastException if the class of the specified element       * @throws ClassCastException if the class of the specified element
176       *         prevents it from being added to this deque       *         prevents it from being added to this deque
177         * @throws NullPointerException if the specified element is null and this
178         *         deque does not permit null elements
179       * @throws IllegalArgumentException if some property of the specified       * @throws IllegalArgumentException if some property of the specified
180       *         element prevents it from being added to this deque       *         element prevents it from being added to this deque
181       */       */
# Line 190  Line 190 
190       * @param e the element to add       * @param e the element to add
191       * @throws IllegalStateException if the element cannot be added at this       * @throws IllegalStateException if the element cannot be added at this
192       *         time due to capacity restrictions       *         time due to capacity restrictions
      * @throws NullPointerException if the specified element is null and this  
      *         deque does not permit null elements  
193       * @throws ClassCastException if the class of the specified element       * @throws ClassCastException if the class of the specified element
194       *         prevents it from being added to this deque       *         prevents it from being added to this deque
195         * @throws NullPointerException if the specified element is null and this
196         *         deque does not permit null elements
197       * @throws IllegalArgumentException if some property of the specified       * @throws IllegalArgumentException if some property of the specified
198       *         element prevents it from being added to this deque       *         element prevents it from being added to this deque
199       */       */
# Line 208  Line 208 
208       * @param e the element to add       * @param e the element to add
209       * @return <tt>true</tt> if it was possible to insert the element,       * @return <tt>true</tt> if it was possible to insert the element,
210       *         else <tt>false</tt>       *         else <tt>false</tt>
      * @throws NullPointerException if the specified element is null and this  
      *         deque does not permit null elements  
211       * @throws ClassCastException if the class of the specified element       * @throws ClassCastException if the class of the specified element
212       *         prevents it from being added to this deque       *         prevents it from being added to this deque
213         * @throws NullPointerException if the specified element is null and this
214         *         deque does not permit null elements
215       * @throws IllegalArgumentException if some property of the specified       * @throws IllegalArgumentException if some property of the specified
216       *         element prevents it from being added to this deque       *         element prevents it from being added to this deque
217       */       */
# Line 226  Line 226 
226       * @param e the element to add       * @param e the element to add
227       * @return <tt>true</tt> if it was possible to insert the element,       * @return <tt>true</tt> if it was possible to insert the element,
228       *         else <tt>false</tt>       *         else <tt>false</tt>
      * @throws NullPointerException if the specified element is null and this  
      *         deque does not permit null elements  
229       * @throws ClassCastException if the class of the specified element       * @throws ClassCastException if the class of the specified element
230       *         prevents it from being added to this deque       *         prevents it from being added to this deque
231         * @throws NullPointerException if the specified element is null and this
232         *         deque does not permit null elements
233       * @throws IllegalArgumentException if some property of the specified       * @throws IllegalArgumentException if some property of the specified
234       *         element prevents it from being added to this deque       *         element prevents it from being added to this deque
235       */       */
# Line 311  Line 311 
311       * Removes the first occurrence of the specified element from this deque.       * Removes the first occurrence of the specified element from this deque.
312       * If the deque does not contain the element, it is unchanged.       * If the deque does not contain the element, it is unchanged.
313       * More formally, removes the first element <tt>e</tt> such that       * More formally, removes the first element <tt>e</tt> such that
314       * <tt>(o==null ? e==null : o.equals(e))</tt> (if such an element exists).       * <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt>
315         * (if such an element exists).
316       * Returns true if this deque contained the specified element (or       * Returns true if this deque contained the specified element (or
317       * equivalently, if this deque changed as a result of the call).       * equivalently, if this deque changed as a result of the call).
318       *       *
319       * @param o element to be removed from this deque, if present       * @param o element to be removed from this deque, if present
320       * @return <tt>true</tt> if an element was removed as a result of this call       * @return <tt>true</tt> if an element was removed as a result of this call
321         * @throws ClassCastException if the class of the specified element
322         *         is incompatible with this deque (optional)
323       * @throws NullPointerException if the specified element is null and this       * @throws NullPointerException if the specified element is null and this
324       *         deque does not permit null elements (optional)       *         deque does not permit null elements (optional)
      * @throws ClassCastException if the class of the specified element  
      *         is incompatible with this collection (optional)  
325       */       */
326      boolean removeFirstOccurrence(Object o);      boolean removeFirstOccurrence(Object o);
327    
# Line 328  Line 329 
329       * Removes the last occurrence of the specified element from this deque.       * Removes the last occurrence of the specified element from this deque.
330       * If the deque does not contain the element, it is unchanged.       * If the deque does not contain the element, it is unchanged.
331       * More formally, removes the last element <tt>e</tt> such that       * More formally, removes the last element <tt>e</tt> such that
332       * <tt>(o==null ? e==null : o.equals(e))</tt> (if such an element exists).       * <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt>
333         * (if such an element exists).
334       * Returns true if this deque contained the specified element (or       * Returns true if this deque contained the specified element (or
335       * equivalently, if this deque changed as a result of the call).       * equivalently, if this deque changed as a result of the call).
336       *       *
337       * @param o element to be removed from this deque, if present       * @param o element to be removed from this deque, if present
338       * @return <tt>true</tt> if an element was removed as a result of this call       * @return <tt>true</tt> if an element was removed as a result of this call
339         * @throws ClassCastException if the class of the specified element
340         *         is incompatible with this deque (optional)
341       * @throws NullPointerException if the specified element is null and this       * @throws NullPointerException if the specified element is null and this
342       *         deque does not permit null elements (optional)       *         deque does not permit null elements (optional)
      * @throws ClassCastException if the class of the specified element  
      *         is incompatible with this collection (optional)  
343       */       */
344      boolean removeLastOccurrence(Object o);      boolean removeLastOccurrence(Object o);
345    
# Line 358  Line 360 
360       * @return <tt>true</tt> (as per the spec for {@link Collection#add})       * @return <tt>true</tt> (as per the spec for {@link Collection#add})
361       * @throws IllegalStateException if the element cannot be added at this       * @throws IllegalStateException if the element cannot be added at this
362       *         time due to capacity restrictions       *         time due to capacity restrictions
      * @throws NullPointerException if the specified element is null and this  
      *         deque does not permit null elements  
363       * @throws ClassCastException if the class of the specified element       * @throws ClassCastException if the class of the specified element
364       *         prevents it from being added to this deque       *         prevents it from being added to this deque
365         * @throws NullPointerException if the specified element is null and this
366         *         deque does not permit null elements
367       * @throws IllegalArgumentException if some property of the specified       * @throws IllegalArgumentException if some property of the specified
368       *         element prevents it from being added to this deque       *         element prevents it from being added to this deque
369       */       */
# Line 381  Line 383 
383       * @param e the element to add       * @param e the element to add
384       * @return <tt>true</tt> if the element was added to this deque, else       * @return <tt>true</tt> if the element was added to this deque, else
385       *         <tt>false</tt>       *         <tt>false</tt>
      * @throws NullPointerException if the specified element is null and this  
      *         deque does not permit null elements  
386       * @throws ClassCastException if the class of the specified element       * @throws ClassCastException if the class of the specified element
387       *         prevents it from being added to this deque       *         prevents it from being added to this deque
388         * @throws NullPointerException if the specified element is null and this
389         *         deque does not permit null elements
390       * @throws IllegalArgumentException if some property of the specified       * @throws IllegalArgumentException if some property of the specified
391       *         element prevents it from being added to this deque       *         element prevents it from being added to this deque
392       */       */
# Line 455  Line 457 
457       * @param e the element to push       * @param e the element to push
458       * @throws IllegalStateException if the element cannot be added at this       * @throws IllegalStateException if the element cannot be added at this
459       *         time due to capacity restrictions       *         time due to capacity restrictions
      * @throws NullPointerException if the specified element is null and this  
      *         deque does not permit null elements  
460       * @throws ClassCastException if the class of the specified element       * @throws ClassCastException if the class of the specified element
461       *         prevents it from being added to this deque       *         prevents it from being added to this deque
462         * @throws NullPointerException if the specified element is null and this
463         *         deque does not permit null elements
464       * @throws IllegalArgumentException if some property of the specified       * @throws IllegalArgumentException if some property of the specified
465       *         element prevents it from being added to this deque       *         element prevents it from being added to this deque
466       */       */
# Line 483  Line 485 
485       * Removes the first occurrence of the specified element from this deque.       * Removes the first occurrence of the specified element from this deque.
486       * If the deque does not contain the element, it is unchanged.       * If the deque does not contain the element, it is unchanged.
487       * More formally, removes the first element <tt>e</tt> such that       * More formally, removes the first element <tt>e</tt> such that
488       * <tt>(o==null ? e==null : o.equals(e))</tt> (if such an element exists).       * <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt>
489         * (if such an element exists).
490       * Returns true if this deque contained the specified element (or       * Returns true if this deque contained the specified element (or
491       * equivalently, if this deque changed as a result of the call).       * equivalently, if this deque changed as a result of the call).
492       *       *
# Line 491  Line 494 
494       *       *
495       * @param o element to be removed from this deque, if present       * @param o element to be removed from this deque, if present
496       * @return <tt>true</tt> if an element was removed as a result of this call       * @return <tt>true</tt> if an element was removed as a result of this call
497         * @throws ClassCastException if the class of the specified element
498         *         is incompatible with this deque (optional)
499       * @throws NullPointerException if the specified element is null and this       * @throws NullPointerException if the specified element is null and this
500       *         deque does not permit null elements (optional)       *         deque does not permit null elements (optional)
      * @throws ClassCastException if the class of the specified element  
      *         is incompatible with this collection (optional)  
501       */       */
502      boolean remove(Object o);      boolean remove(Object o);
503    
504      /**      /**
505       * Returns <tt>true</tt> if this deque contains the specified element.       * Returns <tt>true</tt> if this deque contains the specified element.
506       * More formally, returns <tt>true</tt> if and only if this deque       * More formally, returns <tt>true</tt> if and only if this deque contains
507       * contains at least one element <tt>e</tt> such that <tt>(o==null ?       * at least one element <tt>e</tt> such that
508       * e==null : o.equals(e))</tt>.       * <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt>.
509       *       *
510       * @param o element whose presence in this deque is to be tested       * @param o element whose presence in this deque is to be tested
511       * @return <tt>true</tt> if this deque contains the specified element       * @return <tt>true</tt> if this deque contains the specified element

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8