File tree 1 file changed +3
-6
lines changed
2-0-data-structures-and-algorithms/src/main/java/com/bobocode/linked_list
1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 1
1
package com .bobocode .linked_list ;
2
2
3
3
4
-
5
4
import com .bobocode .util .ExerciseNotCompletedException ;
6
5
7
- import java .util .NoSuchElementException ;
8
-
9
6
/**
10
7
* {@link LinkedList} is a list implementation that is based on singly linked generic nodes. A node is implemented as
11
- * inner static class {@link Node<T>}. In order to keep track on nodes, {@link LinkedList} keeps a reference to a head node.
8
+ * inner static class {@link Node<T>}.
12
9
*
13
10
* @param <T> generic type parameter
14
11
*/
@@ -26,7 +23,7 @@ public static <T> List<T> of(T... elements) {
26
23
}
27
24
28
25
/**
29
- * Adds an element to the end of the list
26
+ * Adds an element to the end of the list.
30
27
*
31
28
* @param element element to add
32
29
*/
@@ -75,7 +72,7 @@ public T get(int index) {
75
72
* Returns the first element of the list. Operation is performed in constant time O(1)
76
73
*
77
74
* @return the first element of the list
78
- * @throws NoSuchElementException if list is empty
75
+ * @throws java.util. NoSuchElementException if list is empty
79
76
*/
80
77
@ Override
81
78
public T getFirst () {
You can’t perform that action at this time.
0 commit comments