Package org.sqlite.date
Class FastDateParser.TimeZoneStrategy
java.lang.Object
org.sqlite.date.FastDateParser.Strategy
org.sqlite.date.FastDateParser.TimeZoneStrategy
- Enclosing class:
FastDateParser
A strategy that handles a timezone field in the parsing pattern
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intIndex of zone idprivate static final intIndex of the long name of zone in daylight saving timeprivate static final intIndex of the long name of zone in standard timeprivate static final intIndex of the short name of zone in daylight saving timeprivate static final intIndex of the short name of zone in standard timeprivate final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) booleanaddRegex(FastDateParser parser, StringBuilder regex) Generate aPatternregular expression to theStringBuilderwhich will accept this field(package private) voidsetCalendar(FastDateParser parser, Calendar cal, String value) Set the Calendar with the parsed field.Methods inherited from class org.sqlite.date.FastDateParser.Strategy
isNumber
-
Field Details
-
validTimeZoneChars
-
tzNames
-
ID
private static final int IDIndex of zone id- See Also:
-
LONG_STD
private static final int LONG_STDIndex of the long name of zone in standard time- See Also:
-
SHORT_STD
private static final int SHORT_STDIndex of the short name of zone in standard time- See Also:
-
LONG_DST
private static final int LONG_DSTIndex of the long name of zone in daylight saving time- See Also:
-
SHORT_DST
private static final int SHORT_DSTIndex of the short name of zone in daylight saving time- See Also:
-
-
Constructor Details
-
TimeZoneStrategy
TimeZoneStrategy(Locale locale) Construct a Strategy that parses a TimeZone- Parameters:
locale- The Locale
-
-
Method Details
-
addRegex
Generate aPatternregular expression to theStringBuilderwhich will accept this field- Specified by:
addRegexin classFastDateParser.Strategy- Parameters:
parser- The parser calling this strategyregex- TheStringBuilderto append to- Returns:
- true, if this field will set the calendar; false, if this field is a constant value
-
setCalendar
Set the Calendar with the parsed field.The default implementation does nothing.
- Overrides:
setCalendarin classFastDateParser.Strategy- Parameters:
parser- The parser calling this strategycal- TheCalendarto setvalue- The parsed field to translate and set in cal
-