summaryrefslogtreecommitdiff
path: root/src/main/java/au/id/zancanaro/javacheck/statem/CommandResult.java
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@zancanaro.id.au>2015-06-05 17:30:46 +1000
committerCarlo Zancanaro <carlo@zancanaro.id.au>2015-06-05 17:30:46 +1000
commit05ec409ce96da92d430c4a8e58b08d46f42d667a (patch)
tree2c3d8925fa9dd86cc265dcfbcb1fe5d8ee97cd0b /src/main/java/au/id/zancanaro/javacheck/statem/CommandResult.java
parent20b1226b4eb10e85497862bd73fe9e9a2f05191d (diff)
More work on the stateful checker; still not perfect, but it's getting better
Diffstat (limited to 'src/main/java/au/id/zancanaro/javacheck/statem/CommandResult.java')
-rw-r--r--src/main/java/au/id/zancanaro/javacheck/statem/CommandResult.java31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/main/java/au/id/zancanaro/javacheck/statem/CommandResult.java b/src/main/java/au/id/zancanaro/javacheck/statem/CommandResult.java
deleted file mode 100644
index dc5b085..0000000
--- a/src/main/java/au/id/zancanaro/javacheck/statem/CommandResult.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package au.id.zancanaro.javacheck.statem;
-
-public class CommandResult<State> {
- private final State state;
- private final Throwable thrown;
-
- private CommandResult(State state, Throwable thrown) {
- this.state = state;
- this.thrown = thrown;
- }
-
- public State getState() {
- return state;
- }
-
- public boolean isFailed() {
- return thrown != null;
- }
-
- public Throwable getThrown() {
- return thrown;
- }
-
- public static <State> CommandResult<State> success(State state) {
- return new CommandResult<>(state, null);
- }
-
- public static <State> CommandResult<State> fail(State state, Throwable ex) {
- return new CommandResult<>(state, ex);
- }
-}