Package com.saperion.ngc.configuration
Class Parameter
java.lang.Object
com.saperion.ngc.configuration.Parameter
A configuration parameter.
- 
Constructor SummaryConstructors
- 
Method Summary
- 
Constructor Details- 
ParameterCreates a new parameter.- Parameters:
- name- the parameter's name
- rawValue- the parameter's value as string
 
 
- 
- 
Method Details- 
getName- Returns:
- the name of the parameter
 
- 
foundpublic boolean found()- Returns:
- true if a value for the parameter was found
 
- 
getString- Returns:
- the value as string
 
- 
getBooleanpublic boolean getBoolean()- Returns:
- the value as boolean
 
- 
getIntpublic int getInt()- Returns:
- the value as int. Throws a NumberFormatExceptionif the value cannot be parsed as int.
 
- 
getLongpublic long getLong()- Returns:
- the value as long. Throws a NumberFormatExceptionif the value cannot be parsed as long.
 
- 
getString- Parameters:
- defaultString- the value to return if no value was found in the configuration
- Returns:
- the value as string or the default value if the parameter was not found
 
- 
getBooleanpublic boolean getBoolean(boolean defaultBoolean) - Parameters:
- defaultBoolean- the value to return if no value was found in the configuration
- Returns:
- the value as boolean or the default value if the parameter was not found
 
- 
getIntpublic int getInt(int defaultInteger) - Parameters:
- defaultInteger- the value to return if no value was found in the configuration
- Returns:
- the value as int or the default value if the parameter was not found
 
- 
getLongpublic long getLong(long defaultLong) - Parameters:
- defaultLong- the value to return if no value was found in the configuration
- Returns:
- the value as long or the default value if the parameter was not found
 
 
-