Package org.h2.mode
Enum ToDateTokenizer.FormatTokenEnum
- All Implemented Interfaces:
Serializable
,Comparable<ToDateTokenizer.FormatTokenEnum>
,java.lang.constant.Constable
- Enclosing class:
ToDateTokenizer
The format tokens.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final List
<ToDateTokenizer.FormatTokenEnum> private final Pattern
private final ToDateTokenizer.ToDateParslet
private static List<ToDateTokenizer.FormatTokenEnum>[]
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
FormatTokenEnum
(ToDateTokenizer.ToDateParslet toDateParslet) Construct a format token.private
FormatTokenEnum
(ToDateTokenizer.ToDateParslet toDateParslet, Pattern patternToUse) Construct a format token. -
Method Summary
Modifier and TypeMethodDescription(package private) static List
<ToDateTokenizer.FormatTokenEnum> getTokensInQuestion
(String formatStr) Optimization: Only return a list ofToDateTokenizer.FormatTokenEnum
that share the same 1st char using the 1st char of the 'to parse' formatStr.private static List<ToDateTokenizer.FormatTokenEnum>[]
(package private) boolean
parseFormatStrWithToken
(ToDateParser params) Parse the format-string with passed token ofToDateTokenizer.FormatTokenEnum
.private static void
putToCache
(List<ToDateTokenizer.FormatTokenEnum>[] cache, ToDateTokenizer.FormatTokenEnum token, String name) Returns the enum constant of this type with the specified name.static ToDateTokenizer.FormatTokenEnum[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
YYYY
-
SYYYY
-
YYY
-
YY
-
SCC
-
CC
-
RRRR
-
RR
-
BC_AD
-
MONTH
-
MON
-
MM
-
RM
-
DDD
-
DAY
-
DD
-
DY
-
HH24
-
HH12
-
HH
-
MI
-
SSSSS
-
SS
-
FF
-
TZH
-
TZM
-
TZR
-
TZD
-
AM_PM
-
EE
-
E
-
Y
-
Q
-
D
-
J
-
INLINE
-
-
Field Details
-
INLINE_LIST
-
TOKENS
-
toDateParslet
-
patternToUse
-
-
Constructor Details
-
FormatTokenEnum
Construct a format token.- Parameters:
toDateParslet
- the date parsletpatternToUse
- the pattern
-
FormatTokenEnum
Construct a format token.- Parameters:
toDateParslet
- the date parslet
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getTokensInQuestion
Optimization: Only return a list ofToDateTokenizer.FormatTokenEnum
that share the same 1st char using the 1st char of the 'to parse' formatStr. Or returnnull
if no match.- Parameters:
formatStr
- the format string- Returns:
- the list of tokens, or
null
-
initTokens
-
putToCache
private static void putToCache(List<ToDateTokenizer.FormatTokenEnum>[] cache, ToDateTokenizer.FormatTokenEnum token, String name) -
parseFormatStrWithToken
Parse the format-string with passed token ofToDateTokenizer.FormatTokenEnum
. If token matches return true, otherwise false.- Parameters:
params
- the parameters- Returns:
- true if it matches
-