Class 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
    • 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]).
      • setPatterns

        public void setPatterns​(java.util.Collection<PatternManager.CategoryPatterns> categoryPatterns)
        Assigns the edited category patterns.
        Parameters:
        categoryPatterns - The list of category patterns.