Package org.languagetool.rules.fr
Class DMYDateCheckFilter
java.lang.Object
org.languagetool.rules.patterns.RuleFilter
org.languagetool.rules.AbstractDateCheckWithSuggestionsFilter
org.languagetool.rules.fr.DateCheckFilter
org.languagetool.rules.fr.DMYDateCheckFilter
Date filter that expects a 'date' argument in the format 'dd-mm-yyyy'.
- Since:
- 2.7
-
Field Summary
Fields inherited from class org.languagetool.rules.AbstractDateCheckWithSuggestionsFilter
DAY_OF_MONTH_PATTERN -
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.fr.DateCheckFilter
getCalendar, getDayOfWeek, getDayOfWeek, getErrorMessageWrongYear, getMonthMethods inherited from class org.languagetool.rules.AbstractDateCheckWithSuggestionsFilter
adjustSuggestion, getDate, getDayOfMonth, getDayStrLikeOriginalMethods inherited from class org.languagetool.rules.patterns.RuleFilter
getLanguageFromRuleMatch, getOptional, getOptional, getPosition, getRequired, getSkipCorrectedReference, getSynthesizerFromRuleMatch, isMatchAtSentenceStart, matches
-
Constructor Details
-
DMYDateCheckFilter
public DMYDateCheckFilter()
-
-
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 classAbstractDateCheckWithSuggestionsFilter- Parameters:
args- a map with values foryear,month,day(day of month),weekDaypatternTokens- 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
-