Package org.languagetool.rules.pt
Class YMDNewYearDateFilter
java.lang.Object
org.languagetool.rules.patterns.RuleFilter
org.languagetool.rules.AbstractNewYearDateFilter
org.languagetool.rules.pt.NewYearDateFilter
org.languagetool.rules.pt.YMDNewYearDateFilter
New year date filter that expects a 'date' argument in the format 'yyyy-mm-dd'.
- Since:
- 4.3
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionacceptRuleMatch(RuleMatch match, Map<String, String> args, int patternTokenPos, AnalyzedTokenReadings[] patternTokens, List<Integer> tokenPositions) Returns the original rule match or a modified one, ornullif the rule match is filtered out.Methods inherited from class org.languagetool.rules.pt.NewYearDateFilter
getCalendar, getMonthMethods inherited from class org.languagetool.rules.AbstractNewYearDateFilter
getCurrentYear, getDayOfMonth, isJanuaryMethods inherited from class org.languagetool.rules.patterns.RuleFilter
getLanguageFromRuleMatch, getOptional, getOptional, getPosition, getRequired, getSkipCorrectedReference, getSynthesizerFromRuleMatch, isMatchAtSentenceStart, matches
-
Field Details
-
ymdDateHelper
-
-
Constructor Details
-
YMDNewYearDateFilter
public YMDNewYearDateFilter()
-
-
Method Details
-
acceptRuleMatch
public RuleMatch acceptRuleMatch(RuleMatch match, Map<String, String> args, int patternTokenPos, AnalyzedTokenReadings[] patternTokens, List<Integer> tokenPositions) Description copied from class:RuleFilterReturns the original rule match or a modified one, ornullif the rule match is filtered out.- Overrides:
acceptRuleMatchin classAbstractNewYearDateFilter- Parameters:
args- a map with values foryear,month,day(day of month)patternTokens- those tokens of the text that correspond the matched pattern- Returns:
nullif this rule match should be removed, or any other RuleMatch (e.g. the one from the arguments) that properly describes the detected error
-