Class HunspellAffix
- java.lang.Object
-
- org.apache.lucene.analysis.hunspell.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 affixjava.lang.String
getAppend()
Returns the append defined for the affixchar[]
getAppendFlags()
Returns the flags defined for the affix appendjava.lang.String
getCondition()
Returns the condition that must be met before the affix can be appliedchar
getFlag()
Returns the affix flagjava.lang.String
getStrip()
Returns the stripping characters defined for the affixboolean
isCrossProduct()
Returns whether the affix is defined as cross productvoid
setAppend(java.lang.String append)
Sets the append defined for the affixvoid
setAppendFlags(char[] appendFlags)
Sets the flags defined for the affix appendvoid
setCondition(java.lang.String condition, java.lang.String pattern)
Sets the condition that must be met before the affix can be appliedvoid
setCrossProduct(boolean crossProduct)
Sets whether the affix is defined as cross productvoid
setFlag(char flag)
Sets the affix flagvoid
setStrip(java.lang.String strip)
Sets the stripping characters defined for the affix
-
-
-
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 applicationpattern
- 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
-
-