-
- All Known Implementing Classes:
BasicSimilarityRule,DotSimilarityRule,HorizontalLineSimilarityRule,PercentDotSimilarityRule,VerticalLineSimilarityRule
public interface SimilarRuleA rule to state certain character pieces are effectively the same, i.e. an l and a | and a 1- Since:
- April 25, 2019
-
-
Method Summary
Modifier and Type Method Description java.lang.StringgetName()Gets the name of the rule.booleanmatchesLetter(ImageLetter first)Gets if the current rule matches with the givenImageLetterand is allowed to be processed.booleanmatchesLetter(Letter first)Gets if the current rule matches with the givenImageLetterand is allowed to be processed.default java.util.Optional<it.unimi.dsi.fastutil.objects.Object2DoubleMap.Entry<ImageLetter>>process(java.util.List<it.unimi.dsi.fastutil.objects.Object2DoubleMap.Entry<ImageLetter>> data)When given a list of the potential results of a character (Irrelevant what character it is), this will find the character lowest in the list that does not match the first character's letter and modifier to the current rule.
-
-
-
Method Detail
-
matchesLetter
boolean matchesLetter(ImageLetter first)
Gets if the current rule matches with the givenImageLetterand is allowed to be processed.- Parameters:
first- The firstImageLetterof the data- Returns:
- If the given
ImageLettercan be processed by the current rule
-
matchesLetter
boolean matchesLetter(Letter first)
Gets if the current rule matches with the givenImageLetterand is allowed to be processed.
-
getName
java.lang.String getName()
Gets the name of the rule.- Returns:
- The name of the rule
-
process
default java.util.Optional<it.unimi.dsi.fastutil.objects.Object2DoubleMap.Entry<ImageLetter>> process(java.util.List<it.unimi.dsi.fastutil.objects.Object2DoubleMap.Entry<ImageLetter>> data)
When given a list of the potential results of a character (Irrelevant what character it is), this will find the character lowest in the list that does not match the first character's letter and modifier to the current rule.- Parameters:
data- The possible combination data- Returns:
- If found, the second character
-
-