Class PatternParser
java.lang.Object
com.aquima.interactions.foundation.text.symbol.PatternParser
This parser can be used to parse a date format pattern and use an array of Symbols to construct a DateFormat.
- Since:
- 5.3
- Author:
- Jon van Leuven
-
Constructor Summary
ConstructorsConstructorDescriptionPatternParser
(IDateSymbol[] symbolDefinitions) Construct a pattern parser with the symbol defintions that could be used during parsing. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSymbolDefinition
(IDateSymbol symbol) Add a symbol to the definitions.Parse a pattern.
-
Constructor Details
-
PatternParser
Construct a pattern parser with the symbol defintions that could be used during parsing.- Parameters:
symbolDefinitions
- Array of all Symbol definitions.
-
-
Method Details
-
addSymbolDefinition
Add a symbol to the definitions.- Parameters:
symbol
- The symbol.
-
parse
Parse a pattern.- Parameters:
pattern
- Pattern to parse.- Returns:
- An array of Symbol representing the parsed pattern.
- Throws:
PatternException
- When unable to parse the pattern.
-