blob: c9095fe12f994d793f5f1867f5b4bfaa139cb0a8 (
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
|
package esieequest.controller;
import esieequest.model.command.Command;
public class Parser {
public Parser() {
}
public Command getCommand(final String pCommandString) {
String[] vElements = pCommandString.split(" ");
String vAction = null;
String vOption = null;
if (vElements.length > 0) {
vAction = vElements[0];
}
if (vElements.length > 1) {
vOption = vElements[1];
}
return new Command(vAction, vOption);
}
private void validateCommand() {
// TODO
}
}
|