implementazione di linked tree. manca il tostring
This commit is contained in:
18
exceptions/NonEmptyTreeException.java
Normal file
18
exceptions/NonEmptyTreeException.java
Normal file
@@ -0,0 +1,18 @@
|
||||
package exceptions;
|
||||
|
||||
/**
|
||||
* Signals that the boundaries of a data structure have been illegally
|
||||
* traversed (e.g. past the end of a list).
|
||||
* @author Roberto Tamassia
|
||||
*/
|
||||
//Copyright (c) 2003 Brown University, Providence, RI
|
||||
//Additional modifications and methods by xgiovio
|
||||
|
||||
public class NonEmptyTreeException extends RuntimeException {
|
||||
public NonEmptyTreeException(String message) {
|
||||
super (message);
|
||||
}
|
||||
public NonEmptyTreeException() {
|
||||
super ("Tree already has a root");
|
||||
}
|
||||
}
|
||||
17
exceptions/UndeletableNodeException.java
Normal file
17
exceptions/UndeletableNodeException.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package exceptions;
|
||||
|
||||
/**
|
||||
* Created with MONSTER.
|
||||
* User: xgiovio
|
||||
* Date: 05/03/14
|
||||
* Time: 0.09
|
||||
*/
|
||||
public class UndeletableNodeException extends RuntimeException {
|
||||
|
||||
public UndeletableNodeException(){
|
||||
super("Undeletable Node");
|
||||
}
|
||||
public UndeletableNodeException(String msg){
|
||||
super(msg);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user