Package org.languagetool.rules
Class RuleWithMaxFilter
- java.lang.Object
-
- org.languagetool.rules.RuleWithMaxFilter
-
- All Implemented Interfaces:
RuleMatchFilter
public class RuleWithMaxFilter extends java.lang.Object implements RuleMatchFilter
Filter rule matches so that only the longest match is kept from overlapping matches with the same rule that contains tokens with maxOccurrence > 1.- Since:
- 2.6
-
-
Constructor Summary
Constructors Constructor Description RuleWithMaxFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<RuleMatch>
filter(java.util.List<RuleMatch> ruleMatches)
private boolean
haveSameRule(RuleMatch match, RuleMatch nextMatch)
(package private) boolean
includes(RuleMatch match, RuleMatch nextMatch)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.languagetool.rules.RuleMatchFilter
filter
-
-
-
-
Method Detail
-
filter
public final java.util.List<RuleMatch> filter(java.util.List<RuleMatch> ruleMatches)
- Specified by:
filter
in interfaceRuleMatchFilter
-
-