public class Parser extends Object implements IParser
IParser, supporting only simple operators
referring to the content of a single column.Format or Comparator is defined for the given type. For example, specifying the
text ">= 4" implies, for a column with integer types, that a
direct comparison between integers will be performed. These operators
are:
Format instance). Only two wildcard characters are defined: * and ?
In addition, providing no operator will behave as the operator ~
| Modifier and Type | Class and Description |
|---|---|
protected static class |
Parser.ComparisonOperand
IOperand for comparison operations.
|
protected static class |
Parser.EqualOperand
IOperand for equal/unequal operations.
|
protected static interface |
Parser.IOperand
Internal interface, to be implemented by all operands.
|
protected static class |
Parser.REOperand
Operand for regular expressions.
|
protected static class |
Parser.WildcardOperand
Operand for wildcard expressions.
|
IParser.InstantFilter| Constructor and Description |
|---|
Parser(Format format,
Comparator classComparator,
Comparator<String> stringComparator,
boolean ignoreCase,
int modelIndex) |
| Modifier and Type | Method and Description |
|---|---|
String |
escape(String expression)
IParser interface. |
Parser.IOperand |
getDefaultOperator(boolean instantMode)
Returns the default operator if none is specified by the user
|
protected String |
getInstantAppliedExpression(String expression) |
IParser.InstantFilter |
parseInstantText(String expression)
IParser interface. |
RowFilter |
parseText(String expression)
IParser interface. |
String |
stripHtml(String expression)
IParser interface. |
public Parser(Format format, Comparator classComparator, Comparator<String> stringComparator, boolean ignoreCase, int modelIndex)
public RowFilter parseText(String expression) throws ParseException
IParser interface.parseText in interface IParserexpression - the text to parseParseExceptionpublic IParser.InstantFilter parseInstantText(String expression) throws ParseException
IParser interface.parseInstantText in interface IParserexpression - the text to parseParseExceptionpublic Parser.IOperand getDefaultOperator(boolean instantMode)
instantMode - true if called during instant parsing