diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-04-06 13:50:00 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-04-06 13:50:00 -0400 |
| commit | 79d3a4a47cbc1fcf17c77c6fc12ff826a3077bac (patch) | |
| tree | a69e533c558326d583b3aee891fc815208c7b650 /BJC-Utils2/src/main/java/bjc/utils/cli/ICommandHandler.java | |
| parent | 4355418164c44170cfb329fcbb7e6f1358c0e314 (diff) | |
Minor bugfixes/changes, as well as beginnings of CLI systems
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/cli/ICommandHandler.java')
| -rw-r--r-- | BJC-Utils2/src/main/java/bjc/utils/cli/ICommandHandler.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/cli/ICommandHandler.java b/BJC-Utils2/src/main/java/bjc/utils/cli/ICommandHandler.java new file mode 100644 index 0000000..f806676 --- /dev/null +++ b/BJC-Utils2/src/main/java/bjc/utils/cli/ICommandHandler.java @@ -0,0 +1,22 @@ +package bjc.utils.cli; + +import java.util.function.Function; + +/** + * A handler for a command + * + * @author ben + * + */ +public interface ICommandHandler extends Function<String[], ICommandMode> { + /** + * Handle the command this handler handles + * + * @param args + * The arguments for this command + * @return The command mode to go to after this command + */ + public default ICommandMode handle(String[] args) { + return this.apply(args); + } +} |
