Documentatie IllegalNameException

This commit is contained in:
Leen Dereu
2018-05-24 12:17:33 +02:00
parent 5c64518c41
commit 94a76c2aca

View File

@@ -12,29 +12,18 @@ import be.kuleuven.cs.som.annotate.*;
*/
public class IllegalNameException extends RuntimeException {
/**
* Variable registering the index of this illegal name exception
*/
private final int index;
/**
* Variable referencing the naem of this illegal name exception
*/
private final String name;
/**
* Initalize this new illegal name exception with given operands
*
* @param index
* The index of the character where the exception occurred.
* @param name
* The String where the error occurred.
*
* @post The index of this new illegal name exception is set to the given index
* | new.getIndex() == index
*
* @post The name of this new illegal name exception is set to the given name
* | new.getName() == name
* @post ...
* |new.getIndex() == index
* @post ...
* |new.getName() == name
*/
public IllegalNameException(int index, String name) {
this.index = index;
@@ -42,9 +31,8 @@ public class IllegalNameException extends RuntimeException {
}
/**
* Return the index of this illegal name exception.
*
* @return this.index
* @return ...
* |result == this.index
*/
@Basic @Immutable
public int getIndex() {
@@ -52,9 +40,8 @@ public class IllegalNameException extends RuntimeException {
}
/**
* Return the name of this illegal name exception.
*
* @return this.name
* @return ...
* |result == this.name
*/
@Basic @Immutable
public String getName() {