Class HunspellAffix


  • public class HunspellAffix
    extends java.lang.Object
    Wrapper class representing a hunspell affix
    • Constructor Summary

      Constructors 
      Constructor Description
      HunspellAffix()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean checkCondition​(java.lang.CharSequence text)
      Checks whether the given text matches the conditional pattern on this affix
      java.lang.String getAppend()
      Returns the append defined for the affix
      char[] getAppendFlags()
      Returns the flags defined for the affix append
      java.lang.String getCondition()
      Returns the condition that must be met before the affix can be applied
      char getFlag()
      Returns the affix flag
      java.lang.String getStrip()
      Returns the stripping characters defined for the affix
      boolean isCrossProduct()
      Returns whether the affix is defined as cross product
      void setAppend​(java.lang.String append)
      Sets the append defined for the affix
      void setAppendFlags​(char[] appendFlags)
      Sets the flags defined for the affix append
      void setCondition​(java.lang.String condition, java.lang.String pattern)
      Sets the condition that must be met before the affix can be applied
      void setCrossProduct​(boolean crossProduct)
      Sets whether the affix is defined as cross product
      void setFlag​(char flag)
      Sets the affix flag
      void setStrip​(java.lang.String strip)
      Sets the stripping characters defined for the affix
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HunspellAffix

        public HunspellAffix()
    • Method Detail

      • checkCondition

        public boolean checkCondition​(java.lang.CharSequence text)
        Checks whether the given text matches the conditional pattern on this affix
        Parameters:
        text - Text to check if it matches the affix's conditional pattern
        Returns:
        true if the text meets the condition, false otherwise
      • getAppend

        public java.lang.String getAppend()
        Returns the append defined for the affix
        Returns:
        Defined append
      • setAppend

        public void setAppend​(java.lang.String append)
        Sets the append defined for the affix
        Parameters:
        append - Defined append for the affix
      • getAppendFlags

        public char[] getAppendFlags()
        Returns the flags defined for the affix append
        Returns:
        Flags defined for the affix append
      • setAppendFlags

        public void setAppendFlags​(char[] appendFlags)
        Sets the flags defined for the affix append
        Parameters:
        appendFlags - Flags defined for the affix append
      • getStrip

        public java.lang.String getStrip()
        Returns the stripping characters defined for the affix
        Returns:
        Stripping characters defined for the affix
      • setStrip

        public void setStrip​(java.lang.String strip)
        Sets the stripping characters defined for the affix
        Parameters:
        strip - Stripping characters defined for the affix
      • getCondition

        public java.lang.String getCondition()
        Returns the condition that must be met before the affix can be applied
        Returns:
        Condition that must be met before the affix can be applied
      • setCondition

        public void setCondition​(java.lang.String condition,
                                 java.lang.String pattern)
        Sets the condition that must be met before the affix can be applied
        Parameters:
        condition - Condition to be met before affix application
        pattern - Condition as a regular expression pattern
      • getFlag

        public char getFlag()
        Returns the affix flag
        Returns:
        Affix flag
      • setFlag

        public void setFlag​(char flag)
        Sets the affix flag
        Parameters:
        flag - Affix flag
      • isCrossProduct

        public boolean isCrossProduct()
        Returns whether the affix is defined as cross product
        Returns:
        true if the affix is cross product, false otherwise
      • setCrossProduct

        public void setCrossProduct​(boolean crossProduct)
        Sets whether the affix is defined as cross product
        Parameters:
        crossProduct - Whether the affix is defined as cross product