Package com.ethlo.time.token
Class ConfigurableDateTimeParser
java.lang.Object
com.ethlo.time.token.ConfigurableDateTimeParser
- All Implemented Interfaces:
DateTimeParser
A configurable format `DateTimeParser`.
-
Method Summary
Modifier and TypeMethodDescriptionstatic DateTimeParserof(DateTimeToken... tokens) Create a new parser with the specified tokensparse(String text, ParsePosition parsePosition) Parse the text from the given position of the parsePositionMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.ethlo.time.DateTimeParser
parse
-
Method Details
-
of
Create a new parser with the specified tokens- Parameters:
tokens- The tokens expected in the format- Returns:
- A new parser instance
-
parse
Description copied from interface:DateTimeParserParse the text from the given position of the parsePosition- Specified by:
parsein interfaceDateTimeParser- Parameters:
text- The text to parseparsePosition- The position in which to start- Returns:
- A DateTime holding the parsed data
-