- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
String value parser.
-
Method Summary
-
Method Details
-
parse
Parse the string into a type R instance. Note that this method returns an optional since some parsers may choose to map to null for certain types and value combinations (e.g., empty string "" mapping tonullvalue).- Type Parameters:
R- the return type- Parameters:
val- the string value to parsetype- the type of the result expected- Returns:
- the optional nullable parsed value
- Throws:
IllegalArgumentException- if the format is not parsable or the return type is not supported
-