public class IntegerParameter extends AbstractParameter<Integer>
category, key, LOGGER, mappingFunction, value| Constructor and Description |
|---|
IntegerParameter(String key,
String category,
int defaultValue)
Constructor that uses the default mapping function.
|
IntegerParameter(String key,
String category,
int defaultValue,
Function<String,Integer> customMappingFunction)
Constructor that uses a custom mapping function.
|
| Modifier and Type | Method and Description |
|---|---|
IntegerParameter |
copy()
Creates an unregistered copy of this parameter.
|
String |
getStringValue()
Returns a human readable String of the parameter value.
|
getCategory, getCompositeKey, getKey, getMappingFunction, getValue, isRegistered, loadFromEnvironmentVariables, setMappingFunction, setRegistered, setValue, toStringpublic IntegerParameter(String key, String category, int defaultValue, Function<String,Integer> customMappingFunction) throws IllegalArgumentException
key - the unique key of the parameter, which is used to change it via RESTcategory - the category of the parameterdefaultValue - the default valuecustomMappingFunction - a function that maps strings to the parameter valuesIllegalArgumentException - thrown if the key contains invalid characterspublic IntegerParameter(String key, String category, int defaultValue)
key - the unique key of the parameter, which is used to change it via RESTcategory - the category of the parameterdefaultValue - the default valuepublic IntegerParameter copy()
AbstractParametercopy in class AbstractParameter<Integer>public String getStringValue()
AbstractParametergetStringValue in class AbstractParameter<Integer>Copyright © 2017–2019. All rights reserved.