public class WhitespaceBeforePunctuationRule extends Rule
: ; and % preceded by whitespace.
Checks for:
<a word> : and suggests <a word>:
<a word> ; and suggests <a word>;
<a number> % and suggests <a number>%
| Constructor and Description |
|---|
WhitespaceBeforePunctuationRule(ResourceBundle messages) |
| Modifier and Type | Method and Description |
|---|---|
String |
getDescription()
A short description of the error this rule can detect, usually in the language of the text
that is checked.
|
String |
getId()
A string used to identify the rule in e.g. configuration files.
|
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 WhitespaceBeforePunctuationRule(ResourceBundle messages)
public final String getId()
RuleA-Z
and the underscore.public final String getDescription()
RulegetDescription in class Rulepublic final RuleMatch[] match(AnalyzedSentence sentence)
Rule