Class FastDateParser.CopyQuotedStrategy

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

private static class FastDateParser.CopyQuotedStrategy extends FastDateParser.Strategy
A strategy that copies the static or quoted field in the parsing pattern
  • Field Details

    • formatField

      private final String formatField
  • Constructor Details

    • CopyQuotedStrategy

      CopyQuotedStrategy(String formatField)
      Construct a Strategy that ensures the formatField has literal text
      Parameters:
      formatField - The literal text to match
  • Method Details

    • isNumber

      boolean isNumber()
      Is this field a number? The default implementation returns false.
      Overrides:
      isNumber in class FastDateParser.Strategy
      Returns:
      true, if field is a number
    • 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