Class FormatPiece

java.lang.Object
dev.frostlake.functions.scalar.FormatPiece

public final class FormatPiece extends Object
One piece of a Snowflake date/time format model after the scan: either an ELEMENT — the canonical upper-case spelling of a recognised element (YYYY, MON, HH24, FF3, TZH:TZM, …) — or a run of LITERAL text: separators, unrecognised letters, the contents of a double-quoted run.
  • Method Details

    • element

      public static FormatPiece element(String element)
      An element piece, by its canonical spelling.
    • literal

      public static FormatPiece literal(String literal)
      A literal-text piece.
    • isElement

      public boolean isElement()
      Whether this piece is a format element rather than literal text.
    • element

      public String element()
      The element's canonical spelling, or null for a literal piece.
    • literal

      public String literal()
      The literal text, or null for an element piece.