AndroidAPS/app/src/main/java/de/jotomo/ruffyscripter/commands/CommandResult.java
2017-07-18 21:20:40 +02:00

58 lines
1.3 KiB
Java

package de.jotomo.ruffyscripter.commands;
import de.jotomo.ruffyscripter.History;
import de.jotomo.ruffyscripter.PumpState;
public class CommandResult {
public boolean success;
public boolean enacted;
public Exception exception;
public String message;
public PumpState state;
public History history;
public CommandResult() {
}
public CommandResult success(boolean success) {
this.success = success;
return this;
}
public CommandResult enacted(boolean enacted) {
this.enacted = enacted;
return this;
}
public CommandResult exception(Exception exception) {
this.exception = exception;
return this;
}
public CommandResult message(String message) {
this.message = message;
return this;
}
public CommandResult state(PumpState state) {
this.state = state;
return this;
}
public CommandResult history(History history) {
this.history = history;
return this;
}
@Override
public String toString() {
return "CommandResult{" +
"success=" + success +
", enacted=" + enacted +
", exception=" + exception +
", message='" + message + '\'' +
", state=" + state +
'}';
}
}