[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.14, Sat Jun 18 01:56:01 2005 UTC revision 1.15, Mon Jul 18 19:14:17 2005 UTC
# Line 5  Line 5 
5   */   */
6    
7  package java.util;  package java.util;
8  import java.util.*; // for javadoc  import java.util.*; // for javadoc (till 6280605 is fixed)
9    
10  /**  /**
11   * A linear collection that supports element insertion and removal at   * A linear collection that supports element insertion and removal at
# Line 240  Line 240 
240    
241      /**      /**
242       * Retrieves and removes the first element of this deque.  This method       * Retrieves and removes the first element of this deque.  This method
243       * differs from {@link #pollFirst} only in that it throws an exception       * differs from {@link #pollFirst pollFirst} only in that it throws an
244       * if this deque is empty.       * exception if this deque is empty.
245       *       *
246       * @return the head of this deque       * @return the head of this deque
247       * @throws NoSuchElementException if this deque is empty       * @throws NoSuchElementException if this deque is empty
# Line 250  Line 250 
250    
251      /**      /**
252       * Retrieves and removes the last element of this deque.  This method       * Retrieves and removes the last element of this deque.  This method
253       * differs from {@link #pollLast} only in that it throws an exception if       * differs from {@link #pollLast pollLast} only in that it throws an
254       * this deque is empty.       * exception if this deque is empty.
255       *       *
256       * @return the tail of this deque       * @return the tail of this deque
257       * @throws NoSuchElementException if this deque is empty       * @throws NoSuchElementException if this deque is empty
# Line 276  Line 276 
276    
277      /**      /**
278       * Retrieves, but does not remove, the first element of this deque.       * Retrieves, but does not remove, the first element of this deque.
279       * This method differs from {@link #peekFirst} only in that it throws an       *
280       * exception if this deque is empty.       * This method differs from {@link #peekFirst peekFirst} only in that it
281         * throws an exception if this deque is empty.
282       *       *
283       * @return the head of this deque       * @return the head of this deque
284       * @throws NoSuchElementException if this deque is empty       * @throws NoSuchElementException if this deque is empty
# Line 286  Line 287 
287    
288      /**      /**
289       * Retrieves, but does not remove, the last element of this deque.       * Retrieves, but does not remove, the last element of this deque.
290       * This method differs from {@link #peekLast} only in that it throws an       * This method differs from {@link #peekLast peekLast} only in that it
291       * exception if this deque is empty.       * throws an exception if this deque is empty.
292       *       *
293       * @return the tail of this deque       * @return the tail of this deque
294       * @throws NoSuchElementException if this deque is empty       * @throws NoSuchElementException if this deque is empty
# Line 360  Line 361 
361       * <p>This method is equivalent to {@link #addLast}.       * <p>This method is equivalent to {@link #addLast}.
362       *       *
363       * @param e the element to add       * @param e the element to add
364       * @return <tt>true</tt> (as per the spec for {@link Collection#add})       * @return <tt>true</tt> (as specified by {@link Collection#add})
365       * @throws IllegalStateException if the element cannot be added at this       * @throws IllegalStateException if the element cannot be added at this
366       *         time due to capacity restrictions       *         time due to capacity restrictions
367       * @throws ClassCastException if the class of the specified element       * @throws ClassCastException if the class of the specified element
# Line 398  Line 399 
399      /**      /**
400       * Retrieves and removes the head of the queue represented by this deque       * Retrieves and removes the head of the queue represented by this deque
401       * (in other words, the first element of this deque).       * (in other words, the first element of this deque).
402       * This method differs from {@link #poll} only in that it throws an       * This method differs from {@link #poll poll} only in that it throws an
403       * exception if this deque is empty.       * exception if this deque is empty.
404       *       *
405       * <p>This method is equivalent to {@link #removeFirst()}.       * <p>This method is equivalent to {@link #removeFirst()}.
# Line 423  Line 424 
424      /**      /**
425       * Retrieves, but does not remove, the head of the queue represented by       * Retrieves, but does not remove, the head of the queue represented by
426       * this deque (in other words, the first element of this deque).       * this deque (in other words, the first element of this deque).
427       * This method differs from {@link #peek} only in that it throws an       * This method differs from {@link #peek peek} only in that it throws an
428       * exception if this deque is empty.       * exception if this deque is empty.
429       *       *
430       * <p>This method is equivalent to {@link #getFirst()}.       * <p>This method is equivalent to {@link #getFirst()}.

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8