IPattern<T> class abstract

Generic interface supporting parsing and formatting. Parsing always results in a ParseResult which can represent success or failure.

Idiomatic text handling in Time Machine involves creating a pattern once and reusing it multiple times, rather than specifying the pattern text repeatedly. All patterns are immutable and isolate-safe, and include the culture used for localization purposes.

  • T: Type of value to parse or format.
Implementers
Annotations
  • @interface

Constructors

IPattern()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

appendFormat(T value, StringBuffer builder) StringBuffer
Formats the given value as text according to the rules of this pattern, appending to the given StringBuilder.
format(T value) String
Formats the given value as text according to the rules of this pattern.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse(String text) ParseResult<T>
Parses the given text value according to the rules of this pattern.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited