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

Comparing jsr166/src/main/java/util/LinkedList.java (file contents):
Revision 1.6 by dl, Mon Sep 1 12:23:28 2003 UTC vs.
Revision 1.7 by dl, Fri Sep 12 15:38:26 2003 UTC

# Line 442 | Line 442 | public class LinkedList<E>
442      // Queue operations.
443  
444      /**
445 <     * Retrieves, but does not remove, the head (first element) of this list..
445 >     * Retrieves, but does not remove, the head (first element) of this list.
446       * @return the head of this queue, or <tt>null</tt> if this queue is empty.
447 +     * @since 1.5
448       */
449      public E peek() {
450          if (size==0)
# Line 452 | Line 453 | public class LinkedList<E>
453      }
454  
455      /**
456 <     * Retrieves, but does not remove, the head (first element) of this list..
456 >     * Retrieves, but does not remove, the head (first element) of this list.
457       * @return the head of this queue.
458       * @throws NoSuchElementException if this queue is empty.
459 +     * @since 1.5
460       */
461      public E element() {
462          return getFirst();
463      }
464  
465      /**
466 <     * Retrieves and removes the head (first element) of this list..
466 >     * Retrieves and removes the head (first element) of this list.
467       * @return the head of this queue, or <tt>null</tt> if this queue is empty.
468 +     * @since 1.5
469       */
470      public E poll() {
471          if (size==0)
# Line 471 | Line 474 | public class LinkedList<E>
474      }
475  
476      /**
477 <     * Retrieves and removes the head (first element) of this list..
477 >     * Retrieves and removes the head (first element) of this list.
478       * @return the head of this queue.
479       * @throws NoSuchElementException if this queue is empty.
480 +     * @since 1.5
481       */
482      public E remove() {
483          return removeFirst();
# Line 485 | Line 489 | public class LinkedList<E>
489       * @param x the element to add.
490       * @return <tt>true</tt> (as per the general contract of
491       * <tt>Queue.offer</tt>)
492 +     * @since 1.5
493       */
494      public boolean offer(E x) {
495          return add(x);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines