6 |
|
*/ |
7 |
|
|
8 |
|
package java.util; |
9 |
+ |
import java.util.*; // for javadoc |
10 |
|
|
11 |
|
/** |
12 |
|
* Linked list implementation of the <tt>List</tt> interface. Implements all |
145 |
|
} |
146 |
|
|
147 |
|
/** |
148 |
< |
* Inserts the given element at the beginning of this list. |
148 |
> |
* Inserts the specified element at the beginning of this list. |
149 |
|
* |
150 |
< |
* @param e the element to be inserted at the beginning of this list |
150 |
> |
* @param e the element to add |
151 |
|
*/ |
152 |
|
public void addFirst(E e) { |
153 |
|
addBefore(e, header.next); |
154 |
|
} |
155 |
|
|
156 |
|
/** |
157 |
< |
* Appends the given element to the end of this list. (Identical in |
158 |
< |
* function to the <tt>add</tt> method; included only for consistency.) |
157 |
> |
* Appends the specified element to the end of this list. |
158 |
> |
* |
159 |
> |
* <p>This method is equivalent to {@link #add}. |
160 |
|
* |
161 |
< |
* @param e the element to be inserted at the end of this list |
161 |
> |
* @param e the element to add |
162 |
|
*/ |
163 |
|
public void addLast(E e) { |
164 |
|
addBefore(e, header); |
189 |
|
/** |
190 |
|
* Appends the specified element to the end of this list. |
191 |
|
* |
192 |
+ |
* <p>This method is equivalent to {@link #addLast}. |
193 |
+ |
* |
194 |
|
* @param e element to be appended to this list |
195 |
|
* @return <tt>true</tt> (as per the spec for {@link Collection#add}) |
196 |
|
*/ |