summaryrefslogtreecommitdiff
path: root/BJC-Utils2/src/main/java/bjc/utils/cli/ICommandHandler.java
blob: f806676c2bc51578b0f8a216784e79efb2bc8396 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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);
	}
}