public class FloatConverter extends Object implements TypeConverter<Float>
Float.parseFloat(), so look there for all its peccadilloes.Float.parseFloat(String)| Constructor and Description |
|---|
FloatConverter() |
| Modifier and Type | Method and Description |
|---|---|
Float |
convert(String input,
GetOpt options,
OptionSpecification option)
Convert a string into a Float or null.
|
public Float convert(String input, GetOpt options, OptionSpecification option)
convert in interface TypeConverter<Float>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 Float if the string is parseableCommandLineProcessingException - if the parse failsFloat.parseFloat(String)Copyright © 2017. All rights reserved.