public class GlushkovFactorExtender extends Object implements FactorExtender
| Modifier and Type | Class and Description |
|---|---|
static class |
GlushkovFactorExtender.Factory |
| Constructor and Description |
|---|
GlushkovFactorExtender(String pattern,
net.amygdalum.regexparser.RegexParserOption... options) |
| Modifier and Type | Method and Description |
|---|---|
SortedSet<StringMatch> |
extendFactor(net.amygdalum.util.io.CharProvider chars,
boolean longest)
extends a given factor found in a character source to a pattern match in this character source (if such exists)
|
GlushkovFactorExtender |
forFactor(String factor)
initializes this FactorExtender with the matched factor.
|
List<String> |
getBestFactors(int max)
computes the factors considered best for the given pattern and a given maximum length.
|
String |
getPattern() |
int |
getPatternLength() |
boolean |
hasFactor(String factor) |
String |
toString() |
public GlushkovFactorExtender(String pattern, net.amygdalum.regexparser.RegexParserOption... options)
public GlushkovFactorExtender forFactor(String factor)
FactorExtenderforFactor in interface FactorExtenderfactor - the factor this matcher will be able to extendpublic String getPattern()
getPattern in interface FactorExtenderpublic int getPatternLength()
getPatternLength in interface FactorExtenderpublic List<String> getBestFactors(int max)
FactorExtendergetBestFactors in interface FactorExtendermax - the maximum length that the result factors should comply topublic boolean hasFactor(String factor)
hasFactor in interface FactorExtenderfactor - the factor to compare to the patternpublic SortedSet<StringMatch> extendFactor(net.amygdalum.util.io.CharProvider chars, boolean longest)
FactorExtenderextendFactor in interface FactorExtenderchars - a CharProvider with position just behind the current factorlongest - true if this method should return the longest patterns including this factor, otherwise are returnedCopyright © 2020. All rights reserved.