public abstract class AbstractCompoundRule extends Rule
| Constructor and Description |
|---|
AbstractCompoundRule(ResourceBundle messages,
String withHyphenMessage,
String withoutHyphenMessage,
String withOrWithoutHyphenMessage) |
AbstractCompoundRule(ResourceBundle messages,
String withHyphenMessage,
String withoutHyphenMessage,
String withOrWithoutHyphenMessage,
String shortMessage) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract CompoundRuleData |
getCompoundRuleData() |
abstract String |
getDescription()
A short description of the error this rule can detect, usually in the language of the text
that is checked.
|
abstract String |
getId()
A string used to identify the rule in e.g. configuration files.
|
boolean |
isHyphenIgnored()
Flag to indicate if the hyphen is ignored in the text entered by the user.
|
RuleMatch[] |
match(AnalyzedSentence sentence)
Check whether the given sentence matches this error rule, i.e. whether it
contains the error detected by this rule.
|
void |
reset()
If a rule keeps its state over more than the check of one sentence, this
must be implemented so the internal state is reset.
|
addExamplePair, getCategory, getCorrectExamples, getIncorrectExamples, getLocQualityIssueType, getUrl, isDefaultOff, isDictionaryBasedSpellingRule, setCategory, setCorrectExamples, setDefaultOff, setDefaultOn, setIncorrectExamples, setLocQualityIssueType, setUrl, supportsLanguage, toRuleMatchArray, useInOfficepublic AbstractCompoundRule(ResourceBundle messages, String withHyphenMessage, String withoutHyphenMessage, String withOrWithoutHyphenMessage) throws IOException
IOExceptionpublic AbstractCompoundRule(ResourceBundle messages, String withHyphenMessage, String withoutHyphenMessage, String withOrWithoutHyphenMessage, String shortMessage) throws IOException
IOExceptionpublic abstract String getId()
RuleA-Z
and the underscore.public abstract String getDescription()
RulegetDescription in class Ruleprotected abstract CompoundRuleData getCompoundRuleData()
public boolean isHyphenIgnored()
public RuleMatch[] match(AnalyzedSentence sentence)
Rule