Class FastDateParser.TimeZoneStrategy

java.lang.Object
org.sqlite.date.FastDateParser.Strategy
org.sqlite.date.FastDateParser.TimeZoneStrategy
Enclosing class:
FastDateParser

private static class FastDateParser.TimeZoneStrategy extends FastDateParser.Strategy
A strategy that handles a timezone field in the parsing pattern
  • Field Details

    • validTimeZoneChars

      private final String validTimeZoneChars
    • tzNames

      private final SortedMap<String,TimeZone> tzNames
    • ID

      private static final int ID
      Index of zone id
      See Also:
    • LONG_STD

      private static final int LONG_STD
      Index of the long name of zone in standard time
      See Also:
    • SHORT_STD

      private static final int SHORT_STD
      Index of the short name of zone in standard time
      See Also:
    • LONG_DST

      private static final int LONG_DST
      Index of the long name of zone in daylight saving time
      See Also:
    • SHORT_DST

      private static final int SHORT_DST
      Index 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

      boolean addRegex(FastDateParser parser, StringBuilder regex)
      Generate a Pattern regular expression to the StringBuilder which will accept this field
      Specified by:
      addRegex in class FastDateParser.Strategy
      Parameters:
      parser - The parser calling this strategy
      regex - The StringBuilder to append to
      Returns:
      true, if this field will set the calendar; false, if this field is a constant value
    • setCalendar

      void setCalendar(FastDateParser parser, Calendar cal, String value)
      Set the Calendar with the parsed field.

      The default implementation does nothing.

      Overrides:
      setCalendar in class FastDateParser.Strategy
      Parameters:
      parser - The parser calling this strategy
      cal - The Calendar to set
      value - The parsed field to translate and set in cal