Refactor di tutto lo stack. Manca l'esercizio sulle operazioni matematiche via stack. Sulla coda bisogna implementare da zero FixedArrayQueue e poi la relativa versione senza fullexception in ArrayQueue. Esercizi!

This commit is contained in:
2014-03-17 12:11:39 +01:00
parent d60e74a09c
commit 08069c6b46
17 changed files with 318 additions and 95 deletions

41
stack/utility/Node.java Normal file
View File

@@ -0,0 +1,41 @@
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;
}