26 lines
452 B
Java
26 lines
452 B
Java
public class Node<T> {
|
|
private T content = null;
|
|
private Node nextNode = null;
|
|
|
|
public Node(T content) {
|
|
setContent(content);
|
|
}
|
|
|
|
private void setContent(T content) {
|
|
this.content = content;
|
|
}
|
|
|
|
public T getContent() {
|
|
return this.content;
|
|
}
|
|
|
|
public void setNextNode(Node nextNode) {
|
|
this.nextNode = nextNode;
|
|
}
|
|
|
|
public Node getNextNode() {
|
|
return this.nextNode;
|
|
}
|
|
}
|
|
|