Package org.languagetool.rules.patterns
Class PatternTokenMatcher
java.lang.Object
org.languagetool.rules.patterns.PatternTokenMatcher
- Since:
- 2.3
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddMemberAndGroup(AnalyzedToken token) Enables testing multiple conditions specified by different elements.final booleancheckAndGroup(boolean previousValue) booleanfinal booleanfinal booleanisMatched(AnalyzedToken token) Checks whether the rule element matches the token given as a parameter.booleanfinal booleanvoidresolveReference(int firstMatchToken, AnalyzedTokenReadings[] tokens, Language language) toString()
-
Constructor Details
-
PatternTokenMatcher
-
-
Method Details
-
resolveReference
public void resolveReference(int firstMatchToken, AnalyzedTokenReadings[] tokens, Language language) throws IOException - Throws:
IOException
-
getPatternToken
-
isMatched
Checks whether the rule element matches the token given as a parameter.- Parameters:
token- AnalyzedToken to check matching against- Returns:
- True if token matches, false otherwise.
-
addMemberAndGroup
Enables testing multiple conditions specified by different elements. Doesn't test exceptions. Works as logical AND operator only if preceded withprepareAndGroup(int, AnalyzedTokenReadings[], Language), and followed bycheckAndGroup(boolean)- Parameters:
token- the token checked.
-
checkAndGroup
public final boolean checkAndGroup(boolean previousValue) -
isMatchedByScopeNextException
-
isExceptionMatchedCompletely
-
hasPreviousException
public boolean hasPreviousException() -
isMatchedByPreviousException
-
toString
-