blob: bd36041eeace3991db433d5c10e9684229644626 (
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
27
28
29
30
31
|
package esieequest.controller;
import java.util.StringTokenizer;
import esieequest.model.command.Command;
public class Parser {
public Parser() {
}
public Command getCommand(final String pCommandString) {
StringTokenizer vTokenizer = new StringTokenizer(pCommandString);
String vAction = null;
String vOption = null;
if (vTokenizer.hasMoreTokens()) {
vAction = vTokenizer.nextToken();
if (vTokenizer.hasMoreTokens()) {
vOption = vTokenizer.nextToken();
}
}
return new Command(vAction, vOption);
}
private void validateCommand() {
}
}
|