public class CommandBuilder extends Object
Commands.| Constructor and Description |
|---|
CommandBuilder() |
| Modifier and Type | Method and Description |
|---|---|
CommandBuilder |
add(CharSequence... tokens)
Adds tokens to the command under construction, ignoring null and empty tokens.
|
CommandBuilder |
add(CharSequence token)
Adds a token to the command under construction, ignoring null and empty token.
|
CommandBuilder |
add(List<? extends CharSequence> tokens)
Adds a list of tokens to the command under construction, ignoring null and empty tokens.
|
CommandBuilder |
addTokenized(CharSequence sequenceToBeParsed) |
Command |
build()
Builds so-far constructed command, any subsequent call of this method will build command starting from empty command
instance.
|
CommandBuilder |
clear()
Clears the command - all added tokens are removed.
|
CommandBuilder |
remove(CharSequence token)
Remove all occurrences of
token from the command list. |
public CommandBuilder add(List<? extends CharSequence> tokens)
tokens - tokens we are adding to the already existing listCommandBuilderpublic CommandBuilder add(CharSequence... tokens)
tokens - CommandBuilderpublic CommandBuilder add(CharSequence token)
token - token to add to the command listCommandBuilderpublic CommandBuilder addTokenized(CharSequence sequenceToBeParsed)
stringToBeParsed - CommandBuilderpublic CommandBuilder clear()
CommandBuilderpublic CommandBuilder remove(CharSequence token)
token from the command list.token - token to removeCommandBuilderpublic Command build()
Copyright © 2014 JBoss by Red Hat. All rights reserved.