Package org.sqlite.date
Class FastDateParser.ISO8601TimeZoneStrategy
java.lang.Object
org.sqlite.date.FastDateParser.Strategy
org.sqlite.date.FastDateParser.ISO8601TimeZoneStrategy
- Enclosing class:
FastDateParser
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final FastDateParser.Strategyprivate static final FastDateParser.Strategyprivate static final FastDateParser.Strategyprivate final String -
Constructor Summary
ConstructorsConstructorDescriptionISO8601TimeZoneStrategy(String pattern) Construct a Strategy that parses a TimeZone -
Method Summary
Modifier and TypeMethodDescription(package private) booleanaddRegex(FastDateParser parser, StringBuilder regex) Generate aPatternregular expression to theStringBuilderwhich will accept this field(package private) static FastDateParser.StrategygetStrategy(int tokenLen) Factory method for ISO8601TimeZoneStrategies.(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
-
pattern
-
ISO_8601_1_STRATEGY
-
ISO_8601_2_STRATEGY
-
ISO_8601_3_STRATEGY
-
-
Constructor Details
-
ISO8601TimeZoneStrategy
ISO8601TimeZoneStrategy(String pattern) Construct a Strategy that parses a TimeZone- Parameters:
pattern- The Pattern
-
-
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
-
getStrategy
Factory method for ISO8601TimeZoneStrategies.- Parameters:
tokenLen- a token indicating the length of the TimeZone String to be formatted.- Returns:
- a ISO8601TimeZoneStrategy that can format TimeZone String of length
tokenLen. If no such strategy exists, an IllegalArgumentException will be thrown.
-