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.51 by jsr166, Sun Sep 5 21:32:19 2010 UTC vs.
Revision 1.53 by jsr166, Thu Dec 2 04:17:19 2010 UTC

# Line 26 | Line 26
26   package java.util;
27  
28   /**
29 < * Linked list implementation of the {@code List} interface.  Implements all
30 < * optional list operations, and permits all elements (including
31 < * {@code null}).  In addition to implementing the {@code List} interface,
32 < * the {@code LinkedList} class provides uniformly named methods to
33 < * {@code get}, {@code remove} and {@code insert} an element at the
34 < * beginning and end of the list.  These operations allow linked lists to be
35 < * used as a stack, {@linkplain Queue queue}, or {@linkplain Deque
36 < * double-ended queue}.
37 < *
38 < * <p>The class implements the {@code Deque} interface, providing
39 < * first-in-first-out queue operations for {@code add},
40 < * {@code poll}, along with other stack and deque operations.
29 > * Doubly-linked list implementation of the {@code List} and {@code Deque}
30 > * interfaces.  Implements all optional list operations, and permits all
31 > * elements (including {@code null}).
32   *
33   * <p>All of the operations perform as could be expected for a doubly-linked
34   * list.  Operations that index into the list will traverse the list from
# Line 258 | Line 249 | public class LinkedList<E>
249       * @return the last element in this list
250       * @throws NoSuchElementException if this list is empty
251       */
252 <    public E getLast()  {
252 >    public E getLast() {
253          final Node<E> l = last;
254          if (l == null)
255              throw new NoSuchElementException();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines