Package com.iizigo.prop
Class PatternManager
- java.lang.Object
-
- com.iizigo.prop.PatternManager
-
public class PatternManager extends java.lang.Object
The patterns manager supporting Value patterns for formatting and parsing. It keeps a history of user-defined patterns for the different value types.- Author:
- Christopher Mindus
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PatternManager.CategoryPatterns
Class for the value type category containing the patterns.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PatternManager.CategoryPatterns[]
getAllPatterns()
Gets all available patterns for the work-with-patterns dialog box.java.lang.String[][]
getCustomPatterns(Value.Category category)
Gets the patterns for the value type.java.lang.String[][]
getCustomPatterns(Value.Type valueType)
Gets the patterns for the value type.static PatternManager
getInstance()
Gets the instance of the pattern manager.void
setPatterns(java.util.Collection<PatternManager.CategoryPatterns> categoryPatterns)
Assigns the edited category patterns.
-
-
-
Method Detail
-
getInstance
public static PatternManager getInstance()
Gets the instance of the pattern manager.
-
getCustomPatterns
public java.lang.String[][] getCustomPatterns(Value.Type valueType)
Gets the patterns for the value type.- Parameters:
valueType
- The value type.- Returns:
- The array of patterns (in [0]) and pattern descriptions (in [1]).
-
getCustomPatterns
public java.lang.String[][] getCustomPatterns(Value.Category category)
Gets the patterns for the value type.- Parameters:
category
- The value type category.- Returns:
- The array of patterns (in [0]) and pattern descriptions (in [1]).
-
getAllPatterns
public PatternManager.CategoryPatterns[] getAllPatterns()
Gets all available patterns for the work-with-patterns dialog box.
-
setPatterns
public void setPatterns(java.util.Collection<PatternManager.CategoryPatterns> categoryPatterns)
Assigns the edited category patterns.- Parameters:
categoryPatterns
- The list of category patterns.
-
-