Class MapRule

  • All Implemented Interfaces:
    java.io.Serializable

    public class MapRule
    extends java.lang.Object
    implements java.io.Serializable
    A class representing the language rules and their mapping to the segmentation rules for each particular language.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      MapRule()
      creates a new empty MapRule
      MapRule​(java.lang.String language, java.lang.String pattern, java.util.List<Rule> rules)
      creates an initialized MapRule
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      MapRule copy()  
      boolean equals​(java.lang.Object obj)
      Indicates whether some other MapRule is "equal to" this one.
      java.util.regex.Pattern getCompiledPattern()
      Returns Compiled Pattern for the language/country ISO code (of a form LL-CC).
      java.lang.String getLanguage()
      Returns Language Name (to display it in a dialog).
      java.lang.String getLanguageCode()
      Returns Language Code for programmatic usage.
      java.lang.String getPattern()
      Returns Pattern for the language/country ISO code (of a form LL-CC).
      java.util.List<Rule> getRules()
      Returns List of rules (of class Rule) for the language
      int hashCode()
      Returns a hash code value for the object.
      void setLanguage​(java.lang.String language)
      Sets Language Name
      void setPattern​(java.lang.String pattern)
      Sets Pattern for the language/country ISO code (of a form LL-CC).
      void setRules​(java.util.List<Rule> rules)
      Sets List of rules (of class Rule) for the language
      java.lang.String toString()
      Returns a string representation of the MapRule for debugging purposes.
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • MapRule

        public MapRule()
        creates a new empty MapRule
      • MapRule

        public MapRule​(java.lang.String language,
                       java.lang.String pattern,
                       java.util.List<Rule> rules)
        creates an initialized MapRule
    • Method Detail

      • getLanguage

        public java.lang.String getLanguage()
        Returns Language Name (to display it in a dialog).
      • setLanguage

        public void setLanguage​(java.lang.String language)
        Sets Language Name
      • getLanguageCode

        public java.lang.String getLanguageCode()
        Returns Language Code for programmatic usage.
      • getPattern

        public java.lang.String getPattern()
        Returns Pattern for the language/country ISO code (of a form LL-CC).
      • getCompiledPattern

        public java.util.regex.Pattern getCompiledPattern()
        Returns Compiled Pattern for the language/country ISO code (of a form LL-CC).
      • setPattern

        public void setPattern​(java.lang.String pattern)
                        throws java.util.regex.PatternSyntaxException
        Sets Pattern for the language/country ISO code (of a form LL-CC).
        Throws:
        java.util.regex.PatternSyntaxException
      • getRules

        public java.util.List<Rule> getRules()
        Returns List of rules (of class Rule) for the language
      • setRules

        public void setRules​(java.util.List<Rule> rules)
        Sets List of rules (of class Rule) for the language
      • equals

        public boolean equals​(java.lang.Object obj)
        Indicates whether some other MapRule is "equal to" this one.
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Returns a hash code value for the object.
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Returns a string representation of the MapRule for debugging purposes.
        Overrides:
        toString in class java.lang.Object