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.5 by dl, Sun Aug 31 13:33:06 2003 UTC vs.
Revision 1.7 by dl, Fri Sep 12 15:38:26 2003 UTC

# Line 1 | Line 1
1   /*
2 < * @(#)LinkedList.java  1.53 03/06/22
2 > * %W% %E%
3   *
4   * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
5   * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
# Line 62 | Line 62 | package java.util;
62   * Java Collections Framework</a>.
63   *
64   * @author  Josh Bloch
65 < * @version 1.53, 06/22/03
65 > * @version %I%, %G%
66   * @see     List
67   * @see     ArrayList
68   * @see     Vector
# 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