public class CommandModel
extends java.lang.Object
CommandParser.| Modifier and Type | Method and Description | 
|---|---|
CommandParser | 
getParser()
Gets the parser which defines this model. 
 | 
java.lang.Object | 
getValue(java.lang.String name)
Gets the value of a parameter or option, or null if absent. 
 | 
int | 
getValue(java.lang.String name,
        int defaultValue)
Gets the int value of a parameter or option, or a default value if absent. 
 | 
java.lang.String | 
getValue(java.lang.String name,
        java.lang.String defaultValue)
Gets the String value of a parameter or option, or a default value if absent. 
 | 
<T> T | 
getValue(java.lang.String name,
        T defaultValue)
Gets the value of a parameter or option, or a default value if absent. 
 | 
boolean | 
isAbsent(java.lang.String name)
Gets whether a parameter or option is absent. 
 | 
boolean | 
isPresent(java.lang.String name)
Gets whether a parameter or option is present. 
 | 
public CommandParser getParser()
public java.lang.Object getValue(java.lang.String name)
name - The canonical name of the parameter or option.java.lang.IllegalArgumentException - if the name is not defined.public <T> T getValue(java.lang.String name,
                      T defaultValue)
name - The canonical name of the value or option.defaultValue - The default value.java.lang.IllegalArgumentException - if the name is not defined.public int getValue(java.lang.String name,
                    int defaultValue)
name - The canonical name of the value or option.defaultValue - The default value.java.lang.IllegalArgumentException - if the name is not defined.public java.lang.String getValue(java.lang.String name,
                                 java.lang.String defaultValue)
name - The canonical name of the value or option.defaultValue - The default value.java.lang.IllegalArgumentException - if the name is not defined.public boolean isAbsent(java.lang.String name)
name - The canonical name of the value or option.java.lang.IllegalArgumentException - if the name is not defined.public boolean isPresent(java.lang.String name)
name - The canonical name of the value or option.java.lang.IllegalArgumentException - if the name is not defined.