| |
|
| java.lang.Object org.naturalcli.ParseResult
ParseResult | public class ParseResult (Code) | | Encapsulate the data that restuls of a command parse.
It means the parameters values and the list of tokens found.
author: Ferran Busquets |
Constructor Summary | |
public | ParseResult(Object[] parameterValues, boolean[] tokensGiven) Constructor
Parameters: paramValues - the ordered parameter values array. |
ParseResult | public ParseResult(Object[] parameterValues, boolean[] tokensGiven)(Code) | | Constructor
Parameters: paramValues - the ordered parameter values array. For optionalparameters not provided will be null Parameters: tokensGiven - the ordered array with all the tokens saying ifeach token is given or not. For non-optional tokensthe value will be always true . |
getParameterCount | public int getParameterCount()(Code) | | Get the number of all possible parameters
number of parameters |
getParameterValue | public Object getParameterValue(int parameterIndex)(Code) | | Get the parameter value in the given index.
Parameters: parameterIndex - the parameter index. This index is relativeonly for the parameters. the parameter value. |
getParameterValues | public Object[] getParameterValues()(Code) | | Get a copy of the parameter values
object array with the prameter values |
getTokensGiven | public boolean[] getTokensGiven()(Code) | | Get a copy of the tokens given.
boolean array with the tokens given. |
isTokenGiven | public boolean isTokenGiven(int tokenIndex)(Code) | | Get if the token is given or not.
Parameters: tokenIndex - the token index. true if the token is given or false if the token is not given (only for optional parameters). |
|
|
|