protected abstract static class ProcessIOContent.Token extends Object
Modifier and Type | Field and Description |
---|---|
private boolean[] |
matchError
Array of match indicators for individual error input strings.
|
private boolean[] |
matchSuccess
Array of match indicators for individual success input strings.
|
private int |
maxLen
Maximum length of all stored strings.
|
private StringPrefixTree<ProcessIOContent.TreeNode> |
outputStrings
Strings to be matched on standard output stored in prefix tree.
|
Modifier | Constructor and Description |
---|---|
protected |
ProcessIOContent.Token(String[] inputSuccess,
String[] inputError)
Create an instance of abstract token expecting set of strings
on standard output.
|
Modifier and Type | Method and Description |
---|---|
protected boolean[] |
getMatchError()
Array of match indicators for individual error input strings.
|
protected int |
getMaxLen()
Get maximum length of all stored strings.
|
protected StringPrefixTree<ProcessIOContent.TreeNode> |
getOutputStrings()
Get strings to be matched on standard output stored in prefix tree.
|
protected String |
getPrompt()
Get process input prompt different from global input prompt.
|
protected boolean |
isSuccess()
Returns status of success matching.
|
protected ProcessIOResult |
match(CharSequence str,
int offset)
Search for tokens in provided string.
|
private final boolean[] matchSuccess
private final boolean[] matchError
private final StringPrefixTree<ProcessIOContent.TreeNode> outputStrings
private final int maxLen
protected ProcessIOContent.Token(String[] inputSuccess, String[] inputError)
inputSuccess
- Array of input strings considered as successful
response to be matched before prompt.inputError
- Array of input strings considered as error
response to be matched before prompt.protected String getPrompt()
null
.protected boolean isSuccess()
true
when all successful input strings
were matched or protected boolean[] getMatchError()
protected StringPrefixTree<ProcessIOContent.TreeNode> getOutputStrings()
protected int getMaxLen()
protected ProcessIOResult match(CharSequence str, int offset)
str
- String to be compared with stored tokens.offset
- Beginning index for searching.Copyright © 2013. All Rights Reserved.