public final class NumberUtilities extends Object
Modifier and Type | Method and Description |
---|---|
static Optional<Float> |
parseFloat(String value)
Try parse float from string and return
Optional.empty() in case of NumberFormatException |
static Optional<Integer> |
parseInt(String value)
Try parse int from string and return
Optional.empty() in case of NumberFormatException |
@Nonnull public static Optional<Float> parseFloat(String value)
Optional.empty()
in case of NumberFormatException
value
- string valueOptional
containing parsed value or empty@Nonnull public static Optional<Integer> parseInt(String value)
Optional.empty()
in case of NumberFormatException
value
- string valueOptional
containing parsed value or emptyCopyright © 2020. All rights reserved.