public class IntegerConverter extends Object implements TypeConverter<Integer>
Integer.parseInt(), so look there for all its peccadilloes.Integer.parseInt(String)| Constructor and Description |
|---|
IntegerConverter() |
| Modifier and Type | Method and Description |
|---|---|
Integer |
convert(String input,
GetOpt options,
OptionSpecification option)
Convert a string into a Integer or null.
|
public Integer convert(String input, GetOpt options, OptionSpecification option)
convert in interface TypeConverter<Integer>input - the input stringoptions - the options set in use (you'll want this for the usage())option - the specific option whose argument we're trying to parsenull if input is null or blank, or a Integer if the string is
parseableCommandLineProcessingException - if the parse failsInteger.parseInt(String)Copyright © 2017. All rights reserved.