[New] Added Command.validateAndDoCommand()

This commit is contained in:
Robert von Burg 2022-02-28 23:35:08 +01:00
parent 5c045129ab
commit 15a84b99ce
1 changed files with 8 additions and 0 deletions

View File

@ -299,4 +299,12 @@ public abstract class Command implements Restrictable {
public void undo() {
// do nothing
}
/**
* Simple method to call {@link #validate()} and {@link #doCommand()} in a single call
*/
public void validateAndDoCommand() {
validate();
doCommand();
}
}