Moved exception class
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
//CipherStreamJava/src/main/java/mattrixwv/CipherStreamJava/Exceptions/InvalidCharacterException.java
|
||||
//Mattrixwv
|
||||
// Created: 01-04-22
|
||||
//Modified: 01-04-22
|
||||
package mattrixwv.CipherStreamJava.Exceptions;
|
||||
|
||||
|
||||
public class InvalidCharacterException extends Exception{
|
||||
public InvalidCharacterException(){
|
||||
super();
|
||||
}
|
||||
public InvalidCharacterException(String message){
|
||||
super(message);
|
||||
}
|
||||
public InvalidCharacterException(Throwable error){
|
||||
super(error);
|
||||
}
|
||||
public InvalidCharacterException(String message, Throwable error){
|
||||
super(message, error);
|
||||
}
|
||||
}
|
||||
@@ -5,20 +5,9 @@
|
||||
//This is the declaration of the Playfair class
|
||||
package mattrixwv.CipherStreamJava;
|
||||
|
||||
import mattrixwv.CipherStreamJava.Exceptions.InvalidCharacterException;
|
||||
|
||||
public class Playfair{
|
||||
//An exception to indicate a bad string was given as a parameter
|
||||
public class InvalidCharacterException extends Exception{
|
||||
InvalidCharacterException(){
|
||||
super();
|
||||
}
|
||||
InvalidCharacterException(String message){
|
||||
super(message);
|
||||
}
|
||||
InvalidCharacterException(String message, Throwable throwable){
|
||||
super(message, throwable);
|
||||
}
|
||||
}
|
||||
//A class representing the location of a character in the grid
|
||||
private class CharLocation{
|
||||
private int x;
|
||||
|
||||
@@ -1,28 +1,14 @@
|
||||
//CipherStreamJava/src/main/java/mattrixwv/CipherStreamJava/PolybiusSquare.java
|
||||
//Mattrixwv
|
||||
// Created: 01-04-21
|
||||
//Modified: 01-04-21
|
||||
// Created: 01-04-22
|
||||
//Modified: 01-04-22
|
||||
package mattrixwv.CipherStreamJava;
|
||||
|
||||
import java.util.StringJoiner;
|
||||
|
||||
import mattrixwv.CipherStreamJava.Exceptions.InvalidCharacterException;
|
||||
|
||||
public class PolybiusSquare{
|
||||
//An exception to indicate a bad number was given in the string
|
||||
//TODO: Move this to a stand alone class
|
||||
public class InvalidCharacterException extends Exception{
|
||||
public InvalidCharacterException(){
|
||||
super();
|
||||
}
|
||||
public InvalidCharacterException(String message){
|
||||
super(message);
|
||||
}
|
||||
public InvalidCharacterException(Throwable error){
|
||||
super(error);
|
||||
}
|
||||
public InvalidCharacterException(String message, Throwable error){
|
||||
super(message, error);
|
||||
}
|
||||
}
|
||||
//A class representing the location of a character in the grid
|
||||
private class CharLocation{
|
||||
private int x;
|
||||
|
||||
Reference in New Issue
Block a user