java.lang.Object
io.helidon.common.ParserHelper
Utility class for parsing.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Throwable>
intparseNonNegative(String s, int radix, Supplier<T> supplier) Throws exception if value returned is negative.
-
Method Details
-
parseNonNegative
public static <T extends Throwable> int parseNonNegative(String s, int radix, Supplier<T> supplier) throws T Throws exception if value returned is negative. MethodInteger.parseUnsignedInt(String, int)can return negative numbers.- Type Parameters:
T- type of throwable- Parameters:
s- string to parseradix- the number radixsupplier- throwable value- Returns:
- the number
- Throws:
T- throwable if number is negative
-