Class StringFromStringParser
java.lang.Object
io.github.grumpystuff.grumpyrest.request.stringparser.standard.StringFromStringParser
- All Implemented Interfaces:
FromStringParser
Returns the argument text as a
String without any actual parsing.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionparseFromString(String s, Type type) Parses a value from a string.booleansupportsType(Type type) Checks if this parser supports the specified type.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.grumpystuff.grumpyrest.request.stringparser.FromStringParser
parseFromAbsentString
-
Constructor Details
-
StringFromStringParser
public StringFromStringParser()Constructor.
-
-
Method Details
-
supportsType
Description copied from interface:FromStringParserChecks if this parser supports the specified type.- Specified by:
supportsTypein interfaceFromStringParser- Parameters:
type- the type to check- Returns:
- true if supported, false if not
-
parseFromString
Description copied from interface:FromStringParserParses a value from a string.- Specified by:
parseFromStringin interfaceFromStringParser- Parameters:
s- the string to parsetype- the type to parse as- Returns:
- the parsed value
-