|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object frysk.hpd.Input
class Input
Command input broken down into a series of parameters.
Nested Class Summary | |
---|---|
(package private) static class |
Input.Token
|
Field Summary | |
---|---|
private String |
fullCommand
|
private String |
set
|
private List |
tokens
|
Constructor Summary | |
---|---|
|
Input(String cmd)
The constructor. |
private |
Input(String fullCommand,
String set,
List tokens)
|
Method Summary | |
---|---|
(package private) Input |
accept()
Accept the current parameter; advance to the next one. |
String |
getFullCommand()
getFullCommand passes a full copy of the command to the caller |
String |
getSet()
|
(package private) Input.Token |
incompleteToken(int cursor)
Return the 'incomplete' token that should be completed; note that an "incomplete" token has "end" set to the cursor position and not the end of the string. |
(package private) String |
parameter(int n)
Return the N'th parameter. |
(package private) void |
removeFirst()
Remove the first token. |
(package private) void |
removeLast()
Remove the last token. |
(package private) int |
size()
Return the number or size of the parameter list. |
(package private) String[] |
stringArrayValue()
Return the value of the remaining input as a String[] (i.e., each token as a separate String). |
(package private) String |
stringValue()
Return the value of the remaining input as a simple (raw) string. |
(package private) Input.Token |
token(int n)
Return the N'th token; or null. |
private List |
tokenize(String str)
Tokenize a string (probably command) minding quoted statements |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final String fullCommand
private final String set
private final List tokens
Constructor Detail |
---|
private Input(String fullCommand, String set, List tokens)
public Input(String cmd)
cmd
- the full preprocessed command in the form defined in
HPDF: [p/t-set/prefix] verb object [option ...] [-option
[value] ...]
ParseException
- thrown if error are encountered
during parsingMethod Detail |
---|
public String getSet()
String parameter(int n)
String[] stringArrayValue()
String stringValue()
Input.Token token(int n)
void removeFirst()
void removeLast()
int size()
public String toString()
toString
in class Object
Input accept()
private List tokenize(String str)
Input.Token incompleteToken(int cursor)
public String getFullCommand()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |