-
- Type Parameters:
T- the actual type to map to.
- All Superinterfaces:
java.util.function.Function<java.lang.String,T>
- All Known Implementing Classes:
IntegerParser,LongParser
public interface Parser<T> extends java.util.function.Function<java.lang.String,T>Generic parser interface for mapping a String to a specific typeT.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Tapply(java.lang.String s)Tparse(java.lang.String s)Parses the submitted string.
-
-
-
Method Detail
-
parse
T parse(java.lang.String s)
Parses the submitted string.- Parameters:
s- the String to parse.- Returns:
- the parse result.
- Throws:
java.lang.RuntimeException- if the parse operation fails.
-
-