ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/Deque.java
(Generate patch)

Comparing jsr166/src/main/java/util/Deque.java (file contents):
Revision 1.9 by jsr166, Mon May 16 04:58:20 2005 UTC vs.
Revision 1.14 by jsr166, Sat Jun 18 01:56:01 2005 UTC

# Line 5 | Line 5
5   */
6  
7   package java.util;
8 + import java.util.*; // for javadoc
9  
10   /**
11   * A linear collection that supports element insertion and removal at
# Line 182 | Line 183 | public interface Deque<E> extends Queue<
183      void addFirst(E e);
184  
185      /**
186 <     * Inserts the specified element at the end of this deque  if it is
186 >     * Inserts the specified element at the end of this deque if it is
187       * possible to do so immediately without violating capacity restrictions.
188       * When using a capacity-restricted deque, it is generally preferable to
189       * use method {@link #offerLast}.
190       *
191 +     * <p>This method is equivalent to {@link #add}.
192 +     *
193       * @param e the element to add
194       * @throws IllegalStateException if the element cannot be added at this
195       *         time due to capacity restrictions
# Line 206 | Line 209 | public interface Deque<E> extends Queue<
209       * which can fail to insert an element only by throwing an exception.
210       *
211       * @param e the element to add
212 <     * @return <tt>true</tt> if it was possible to insert the element,
213 <     *         else <tt>false</tt>
212 >     * @return <tt>true</tt> if the element was added to this deque, else
213 >     *         <tt>false</tt>
214       * @throws ClassCastException if the class of the specified element
215       *         prevents it from being added to this deque
216       * @throws NullPointerException if the specified element is null and this
# Line 224 | Line 227 | public interface Deque<E> extends Queue<
227       * which can fail to insert an element only by throwing an exception.
228       *
229       * @param e the element to add
230 <     * @return <tt>true</tt> if it was possible to insert the element,
231 <     *         else <tt>false</tt>
230 >     * @return <tt>true</tt> if the element was added to this deque, else
231 >     *         <tt>false</tt>
232       * @throws ClassCastException if the class of the specified element
233       *         prevents it from being added to this deque
234       * @throws NullPointerException if the specified element is null and this
# Line 313 | Line 316 | public interface Deque<E> extends Queue<
316       * More formally, removes the first element <tt>e</tt> such that
317       * <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt>
318       * (if such an element exists).
319 <     * Returns true if this deque contained the specified element (or
320 <     * equivalently, if this deque changed as a result of the call).
319 >     * Returns <tt>true</tt> if this deque contained the specified element
320 >     * (or equivalently, if this deque changed as a result of the call).
321       *
322       * @param o element to be removed from this deque, if present
323       * @return <tt>true</tt> if an element was removed as a result of this call
# Line 331 | Line 334 | public interface Deque<E> extends Queue<
334       * More formally, removes the last element <tt>e</tt> such that
335       * <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt>
336       * (if such an element exists).
337 <     * Returns true if this deque contained the specified element (or
338 <     * equivalently, if this deque changed as a result of the call).
337 >     * Returns <tt>true</tt> if this deque contained the specified element
338 >     * (or equivalently, if this deque changed as a result of the call).
339       *
340       * @param o element to be removed from this deque, if present
341       * @return <tt>true</tt> if an element was removed as a result of this call
# Line 354 | Line 357 | public interface Deque<E> extends Queue<
357       * When using a capacity-restricted deque, it is generally preferable to
358       * use {@link #offer(Object) offer}.
359       *
360 <     * <p>This method is equivalent to {@link #addLast(Object) addLast}.
360 >     * <p>This method is equivalent to {@link #addLast}.
361       *
362       * @param e the element to add
363       * @return <tt>true</tt> (as per the spec for {@link Collection#add})
# Line 487 | Line 490 | public interface Deque<E> extends Queue<
490       * More formally, removes the first element <tt>e</tt> such that
491       * <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt>
492       * (if such an element exists).
493 <     * Returns true if this deque contained the specified element (or
494 <     * equivalently, if this deque changed as a result of the call).
493 >     * Returns <tt>true</tt> if this deque contained the specified element
494 >     * (or equivalently, if this deque changed as a result of the call).
495       *
496       * <p>This method is equivalent to {@link #removeFirstOccurrence}.
497       *
# Line 524 | Line 527 | public interface Deque<E> extends Queue<
527      public int size();
528  
529      /**
530 <     * Returns an iterator over the elements in this deque.  The elements
531 <     * will be ordered from first (head) to last (tail).
530 >     * Returns an iterator over the elements in this deque in proper sequence.
531 >     * The elements will be returned in order from first (head) to last (tail).
532       *
533 <     * @return an <tt>Iterator</tt> over the elements in this deque
533 >     * @return an iterator over the elements in this deque in proper sequence
534       */
535      Iterator<E> iterator();
536   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines