42 lines
633 B
Java
42 lines
633 B
Java
package stack.utility;
|
|
|
|
/**
|
|
* Created with MONSTER.
|
|
* User: xgiovio
|
|
* Date: 05/03/14
|
|
* Time: 0.49
|
|
*/
|
|
public class Node<E> {
|
|
|
|
public Node(){
|
|
element = null;
|
|
next = null;
|
|
|
|
}
|
|
|
|
public Node(E in_element, Node<E> in_next){
|
|
element = in_element;
|
|
next = in_next;
|
|
}
|
|
|
|
public E getElement() {
|
|
return element;
|
|
}
|
|
|
|
public void setElement(E element) {
|
|
this.element = element;
|
|
}
|
|
|
|
public Node<E> getNext() {
|
|
return next;
|
|
}
|
|
|
|
public void setNext(Node<E> next) {
|
|
this.next = next;
|
|
}
|
|
|
|
private E element;
|
|
private Node<E> next;
|
|
|
|
}
|