|
|
@ -5,41 +5,32 @@ public class Node <E>{ |
|
|
|
private Node<E> successor; // Nachfolger
|
|
|
|
private E payload; // Nutzlast
|
|
|
|
|
|
|
|
|
|
|
|
//Konstruktor mit Parameter payload
|
|
|
|
public Node(E payload) { |
|
|
|
this.payload = payload; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public Node<E> getPredecessor() { |
|
|
|
return predecessor; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setPredecessor(Node<E> predecessor) { |
|
|
|
this.predecessor = predecessor; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public Node<E> getSuccessor() { |
|
|
|
return successor; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setSuccessor(Node<E> e) { |
|
|
|
this.successor = e; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public E getPayload() { |
|
|
|
return payload; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setPayload(E payload) { |
|
|
|
this.payload = payload; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|