diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/au/id/zancanaro/javacheck/state/queue/commands/Offer.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/test/java/au/id/zancanaro/javacheck/state/queue/commands/Offer.java b/src/test/java/au/id/zancanaro/javacheck/state/queue/commands/Offer.java index 366e974..3f21547 100644 --- a/src/test/java/au/id/zancanaro/javacheck/state/queue/commands/Offer.java +++ b/src/test/java/au/id/zancanaro/javacheck/state/queue/commands/Offer.java @@ -8,7 +8,7 @@ import au.id.zancanaro.javacheck.state.queue.QueueState; import java.util.ArrayList; import java.util.List; -public class Offer<T> extends Command<QueueState<T>, T, Void> { +public class Offer<T> extends Command<QueueState<T>, T, Boolean> { public final Generator<T> generator; public Offer(Generator<T> argGen) { @@ -26,13 +26,12 @@ public class Offer<T> extends Command<QueueState<T>, T, Void> { } @Override - public Void runCommand(QueueState<T> state, T args) { - state.getConcreteQueue().offer(args); - return null; + public Boolean runCommand(QueueState<T> state, T args) { + return state.getConcreteQueue().offer(args); } @Override - public QueueState<T> nextState(QueueState<T> state, T args, CommandValue<Void> result) { + public QueueState<T> nextState(QueueState<T> state, T args, CommandValue<Boolean> result) { List<T> newState = new ArrayList<>(state.getAbstractQueue()); newState.add(args); return state.withAbstractQueue(newState); |