aboutsummaryrefslogtreecommitdiffstats
path: root/src/jcgp/backend/function/IntegerArithmetic.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jcgp/backend/function/IntegerArithmetic.java')
-rw-r--r--src/jcgp/backend/function/IntegerArithmetic.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/jcgp/backend/function/IntegerArithmetic.java b/src/jcgp/backend/function/IntegerArithmetic.java
index c08a72a..9bb02b5 100644
--- a/src/jcgp/backend/function/IntegerArithmetic.java
+++ b/src/jcgp/backend/function/IntegerArithmetic.java
@@ -1,6 +1,5 @@
package jcgp.backend.function;
-import jcgp.backend.exceptions.InvalidArgumentsException;
import jcgp.backend.population.Connection;
public class IntegerArithmetic extends FunctionSet {
@@ -20,7 +19,7 @@ public class IntegerArithmetic extends FunctionSet {
@Override
public Integer run(Connection... connections) {
if (connections.length < 2) {
- throw new InvalidArgumentsException("Not enough connections were given.");
+ throw new IllegalArgumentException("Not enough connections were given.");
} else {
Integer arg1 = ((Integer) connections[0].getValue());
Integer arg2 = ((Integer) connections[1].getValue());
@@ -45,7 +44,7 @@ public class IntegerArithmetic extends FunctionSet {
@Override
public Integer run(Connection... connections) {
if (connections.length < 2) {
- throw new InvalidArgumentsException("Not enough connections were given.");
+ throw new IllegalArgumentException("Not enough connections were given.");
} else {
Integer arg1 = ((Integer) connections[0].getValue());
Integer arg2 = ((Integer) connections[1].getValue());
@@ -70,12 +69,11 @@ public class IntegerArithmetic extends FunctionSet {
@Override
public Integer run(Connection... connections) {
if (connections.length < 2) {
- throw new InvalidArgumentsException("Not enough connections were given.");
+ throw new IllegalArgumentException("Not enough connections were given.");
} else {
Integer arg1 = ((Integer) connections[0].getValue());
Integer arg2 = ((Integer) connections[1].getValue());
Integer result = arg1 * arg2;
-
return result;
}
}
@@ -95,7 +93,7 @@ public class IntegerArithmetic extends FunctionSet {
@Override
public Integer run(Connection... connections) {
if (connections.length < 2) {
- throw new InvalidArgumentsException("Not enough connections were given.");
+ throw new IllegalArgumentException("Not enough connections were given.");
} else {
Integer arg1 = ((Integer) connections[0].getValue());
Integer arg2 = ((Integer) connections[1].getValue());