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