Package com._1c.g5.v8.dt.common
Class FuzzyPattern
java.lang.Object
com._1c.g5.v8.dt.common.FuzzyPattern
Fuzzy pattern matcher. Sample string matched if:
- Sample string contains pattern string as a simple substring.
- All pattern words are prefixes of corresponding sample words.
- Pattern may be split into words that all matches prefixes of sample words.
For example, given the pattern "foo123bar", the pattern words are: foo,
123, bar.
Following samples are matched: FooBar123, FoobuzBarbuz12345,
123 bar foo, B12Ar3foo.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresent the fuzzy match result. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMatches the sample.
-
Constructor Details
-
FuzzyPattern
Instantiates a new fuzzy pattern.- Parameters:
pattern- the pattern
-
-
Method Details
-
match
Matches the sample.- Parameters:
sample- sample to match.useMutation- use mutation (splitting) of pattern- Returns:
FuzzyPattern.Match.NONEif sample not matched,FuzzyPattern.Matchdescribing the match otherwise.
-