Bluestep JS Documentation
    Preparing search index...

    Class Formatter

    A stateful message formatter that wraps Java's MessageFormat. Supports formatting, parsing, positional value setting, and typed value extraction.

    Index

    Constructors

    Methods

    • Clears the current error. Returns true if an error was cleared, false otherwise.

      Returns boolean

    • Returns the current error message, or null if no error.

      Returns string

    • Formats the stored values using the pattern. Any arguments passed are set as positional values before formatting.

      Parameters

      • Optionalargs: any

        Values to set at positions 0, 1, 2, etc. before formatting.

      Returns string

    • Gets the parsed value at the given position as a boolean.

      Parameters

      • position: number

        The zero-based positional index.

      Returns boolean

    • Gets the parsed value at the given position as a Date (date-only, no time component).

      Parameters

      • position: number

        The zero-based positional index.

      Returns Calendar

    • Gets the parsed value at the given position as a DateTime.

      Parameters

      • position: number

        The zero-based positional index.

      Returns Calendar

    • Gets the parsed value at the given position as a floating-point number.

      Parameters

      • position: number

        The zero-based positional index.

      Returns number

    • Gets the parsed value at the given position as an integer.

      Parameters

      • position: number

        The zero-based positional index.

      Returns number

    • Gets the parsed value at the given position as a string.

      Parameters

      • position: number

        The zero-based positional index.

      Returns string

    • Gets the parsed value at the given position as a Time (time-only, no date component).

      Parameters

      • position: number

        The zero-based positional index.

      Returns Calendar

    • Parses a string using the pattern and stores the extracted values. Returns true on success, false on failure.

      Parameters

      • str: string

        The string to parse.

      Returns boolean

    • Sets a value at the specified positional index. Returns true if the value changed, false if it stayed the same.

      Parameters

      • index: number

        The zero-based positional index.

      • value: any

        The value to set.

      Returns boolean