summaryrefslogtreecommitdiff
path: root/BJC-Utils2/src/main/java/bjc/utils/cli/fds/FDSCommand.java
blob: ddbb743dc16acba59b1abbff9f317f3d0291931e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package bjc.utils.cli.fds;

import bjc.utils.ioutils.BlockReader;

/**
 * A command attached to an FDS interface.
 * 
 * @author bjculkin
 *
 * @param <S>
 *                The state type of the interface.
 */
public interface FDSCommand<S> {
	/**
	 * Run this command.
	 * 
	 * @param state
	 *                The current FDS state.
	 * 
	 * @param input
	 *                The source for data input.
	 * 
	 * @return The new state, after running the command.
	 */
	S run(S state, BlockReader input);
}