Code cleanup : fix C style array declaration.
[Project_POO.git] / exo4 / Node.java
CommitLineData
bb6a4f9a
JB
1@ClassPreamble (
2 author = "Jérôme Benoit",
3 date = "09/11/2012"
4)
5public class Node<T> {
6 private T data;
7 private Node<T> next;
8
9 Node(T value) {
10 setData(value);
11 setNext(null);
12 }
13
14 Node(T value, Node<T> nextNode) {
15 setData(value);
16 setNext(nextNode);
17 }
18
19 public T getData() {
20 return data;
21 }
22
23 public void setData(T value) {
24 data = value;
25 }
26
27 public Node<T> getNext() {
28 return next;
29 }
30
31 public void setNext(Node<T> nextNode) {
32 next = nextNode;
33 }
34
35}