
public class Command extends Object
| Constructor and Description |
|---|
Command() |
Command(List<String> command) |
Command(String... tokens) |
| Modifier and Type | Method and Description |
|---|---|
Command |
add(List<String> tokens)
Add list of tokens to already existing list we are constructing, ignoring null and empty ones.
|
Command |
add(String token)
Adds a token to the command list.
|
Command |
addAsString(String tokens)
Adds tokens written in the simple string, parsing tokens when delimiter is a space.
|
Command |
clear()
Clears the emulator command list.
|
String |
get(int i)
Returns token on i-th position
|
String[] |
getAsArray() |
List<String> |
getAsList() |
String |
getAsString() |
String |
getFirst() |
String |
getLast() |
Command |
remove(String token)
Remove all occurences of
token from the command list. |
int |
size()
Return size of the command.
|
String |
toString() |
public Command()
public Command(List<String> command) throws IllegalArgumentException
command - IllegalArgumentException - if command is nullpublic Command(String... tokens)
public Command add(String token)
token - token to add to the command listCommandpublic Command add(List<String> tokens)
tokens - tokens we are adding to the already existing listCommandpublic Command addAsString(String tokens)
tokens - tokens to add, saved in the string and delimited by space(s)Commandpublic Command remove(String token)
token from the command list.token - token to removeEmulatorCommandpublic Command clear()
EmulatorCommandpublic int size()
public String[] getAsArray()
public String getAsString()
public String get(int i)
i - position of token we want to getpublic String getLast()
public String getFirst()
Copyright © 2013 JBoss by Red Hat. All rights reserved.