Interface ParseFromStringService
- All Known Implementing Classes:
FromStringParserRegistry
public interface ParseFromStringService
This interface exposes only the
FromStringParserRegistry.parseFromString(String, Type) method.
This interface gets implemented by the registry, not by individual parsers. Use FromStringParser for
individual parsers.
-
Method Summary
Modifier and TypeMethodDescriptionparseFromString(String text, Type type) Parses a string to obtain a value of the specified type.
-
Method Details
-
parseFromString
Parses a string to obtain a value of the specified type.- Parameters:
text- the text to parsetype- the type to convert to- Returns:
- the converted value
- Throws:
FromStringParserException- if conversion fails because the text does not conform to the expected format according to the type to convert to
-