class TimeScanner extends Object
| Modifier and Type | Field and Description |
|---|---|
(package private) static TimeToken[] | MULTIPLIERSMultiplier tokens for relative time offsets |
(package private) TimeToken[] | specials |
(package private) static TimeToken[] | WORDSKeyword tokens for time specification parsing |
| Constructor and Description |
|---|
TimeScanner(String dateString)At-style time specification string to tokenize. |
| Modifier and Type | Method and Description |
|---|---|
(package private) TimeToken | nextToken()Next token from the date string. |
(package private) TimeToken | resolveMonthsMinutes(int newId)Resolve ambiguous MONTHS_MINUTES token to months or minutes. |
(package private) TimeToken | restoreState()Restore previously saved tokenizer position. |
(package private) void | saveState()Save current tokenizer position for backtracking. |
(package private) void | setContext(boolean parsingWords)Switch token context between words and multipliers |
static final TimeToken[] MULTIPLIERS
TimeToken[] specials
static final TimeToken[] WORDS
public TimeScanner(String dateString)
dateString - at-style time specification string to tokenizeTimeToken nextToken()
TimeToken resolveMonthsMinutes(int newId)
TimeToken restoreState()
void saveState()
void setContext(boolean parsingWords)