From e9290a500b228e2561a8537adbc13e86f1356747 Mon Sep 17 00:00:00 2001 From: Eduardo Pedroni Date: Sat, 15 Feb 2014 21:43:35 +0000 Subject: Population and Chromosome classes refactored so that EAs are easier to implement. --- .../exceptions/InsufficientConnectionsException.java | 10 ++++++++++ src/jcgp/exceptions/InvalidArgumentsException.java | 20 ++++++++++++++++++++ src/jcgp/exceptions/ParameterMismatchException.java | 10 ++++++++++ 3 files changed, 40 insertions(+) create mode 100644 src/jcgp/exceptions/InsufficientConnectionsException.java create mode 100644 src/jcgp/exceptions/InvalidArgumentsException.java create mode 100644 src/jcgp/exceptions/ParameterMismatchException.java (limited to 'src/jcgp/exceptions') diff --git a/src/jcgp/exceptions/InsufficientConnectionsException.java b/src/jcgp/exceptions/InsufficientConnectionsException.java new file mode 100644 index 0000000..2ffc10f --- /dev/null +++ b/src/jcgp/exceptions/InsufficientConnectionsException.java @@ -0,0 +1,10 @@ +package jcgp.exceptions; + +public class InsufficientConnectionsException extends RuntimeException { + + /** + * + */ + private static final long serialVersionUID = 660740514800883541L; + +} diff --git a/src/jcgp/exceptions/InvalidArgumentsException.java b/src/jcgp/exceptions/InvalidArgumentsException.java new file mode 100644 index 0000000..537018d --- /dev/null +++ b/src/jcgp/exceptions/InvalidArgumentsException.java @@ -0,0 +1,20 @@ +package jcgp.exceptions; + +public class InvalidArgumentsException extends RuntimeException { + + /** + * + */ + private static final long serialVersionUID = 2675108124600817777L; + private String reason; + + public InvalidArgumentsException(String reason) { + super(); + this.reason = reason; + } + + public String getReason() { + return reason; + } + +} diff --git a/src/jcgp/exceptions/ParameterMismatchException.java b/src/jcgp/exceptions/ParameterMismatchException.java new file mode 100644 index 0000000..93a8f10 --- /dev/null +++ b/src/jcgp/exceptions/ParameterMismatchException.java @@ -0,0 +1,10 @@ +package jcgp.exceptions; + +public class ParameterMismatchException extends RuntimeException { + + /** + * + */ + private static final long serialVersionUID = -3161318886125868134L; + +} -- cgit v1.2.3