public interface InputPart
Enums that define parts of input terms.
Every Enum entry defines one part of an input term which is matchable
by a regular expression.
For example, a naive InputPart Enum for address matching
parts might look like this :
public static enum Parts implements InputParts {
STREET("[A-Z]{1}[A-Za-z]+"),
HOUSENR("[1-9]{1}[0-9]*"),
ZIP("\\d{4,6}"),
STREET("[A-Z]{1}[A-Za-z]+");
private final String matcher;
private Parts(String matcher) {
this.matcher = matcher;
}
public String getMatcher() {
return this.matcher;
}
}
1->n parts of such an Enum can define an InputGroup using
an InputGroup.InputGroupBuilder started with InputGroup.forPart(Enum) or
InputGroup.forPart(Enum, PartOccurrenceMode).
| Modifier and Type | Method and Description |
|---|---|
String |
getMatcher()
Returns the regular expression that is able to
String.matches(String)=true when used on a String that
represents a valid value for the InputPart. |
String getMatcher()
String.matches(String)=true when used on a String that
represents a valid value for the InputPart.PatternCopyright © 2020. All rights reserved.