Package com._1c.g5.v8.dt.lcore.matcher
Class SpecialSequenceFinder
- java.lang.Object
-
- com._1c.g5.v8.dt.lcore.matcher.AbstractSequenceFinder
-
- com._1c.g5.v8.dt.lcore.matcher.DefaultSequenceFinder
-
- com._1c.g5.v8.dt.lcore.matcher.SpecialSequenceFinder
-
public class SpecialSequenceFinder extends DefaultSequenceFinder
Special implementation forDefaultSequenceFinder
This class override methodequalsChar(char, char)
New logic of the method is:- Adds additional compare for char by transformed pattern char to char from different keyboard layout
- Supports only "QWERTY" keyboard layout
-
-
Constructor Summary
Constructors Constructor Description SpecialSequenceFinder(String pattern, String sourceText)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
equalsChar(char sourceTextChar, char patternChar)
Checks that symbols are equalprotected boolean
isSourceTextStartWithPattern(String pattern, String sourceText)
Checks thatsourceText
starts withpattern
-
Methods inherited from class com._1c.g5.v8.dt.lcore.matcher.DefaultSequenceFinder
computePriorityOfSubsequence, filterFoundSequence, findStartIndexOfNextWord, getBestSequence, getBestSequencePriority
-
Methods inherited from class com._1c.g5.v8.dt.lcore.matcher.AbstractSequenceFinder
findSeqeuences, getFoundSequences, getPattern, getSourceText
-
-
-
-
Method Detail
-
equalsChar
protected boolean equalsChar(char sourceTextChar, char patternChar)
Description copied from class:AbstractSequenceFinder
Checks that symbols are equal- Overrides:
equalsChar
in classAbstractSequenceFinder
- Parameters:
sourceTextChar
- char from source textpatternChar
- char from pattern string- Returns:
true
if chars are equal,false
otherwise
-
isSourceTextStartWithPattern
protected boolean isSourceTextStartWithPattern(String pattern, String sourceText)
Description copied from class:DefaultSequenceFinder
Checks thatsourceText
starts withpattern
- Overrides:
isSourceTextStartWithPattern
in classDefaultSequenceFinder
- Parameters:
pattern
- pattern for finding char sequence, can't benull
sourceText
- initial text for finding by pattern, can't benull
- Returns:
true
ifsourceText
starts withpattern
,false
otherwise
-
-