net.coderazzi.filters.parser
Class Parser

java.lang.Object
  extended by net.coderazzi.filters.parser.Parser
All Implemented Interfaces:
IParser

public class Parser
extends Object
implements IParser

Basic implementation of a IParser, supporting only simple operators referring to the content of a single column.
The supporter operators include:

In addition, providing no operator will behave as the operator ~


Nested Class Summary
 
Nested classes/interfaces inherited from interface net.coderazzi.filters.IParser
IParser.InstantFilter
 
Constructor Summary
Parser(Format format, Comparator classComparator, Comparator<String> stringComparator, boolean ignoreCase, int modelIndex)
           
 
Method Summary
 String escape(String expression)
          IParser interface.
 IParser.InstantFilter parseInstantText(String expression)
          IParser interface.
 RowFilter parseText(String expression)
          IParser interface.
 String stripHtml(String expression)
          IParser interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Parser

public Parser(Format format,
              Comparator classComparator,
              Comparator<String> stringComparator,
              boolean ignoreCase,
              int modelIndex)
Method Detail

parseText

public RowFilter parseText(String expression)
                    throws ParseException
IParser interface.

Specified by:
parseText in interface IParser
Parameters:
expression - the text to parse
Throws:
ParseException

parseInstantText

public IParser.InstantFilter parseInstantText(String expression)
                                       throws ParseException
IParser interface.

Specified by:
parseInstantText in interface IParser
Parameters:
expression - the text to parse
Returns:
the filter plus the real expression used to create the filter
Throws:
ParseException

stripHtml

public String stripHtml(String expression)
IParser interface.

Specified by:
stripHtml in interface IParser

escape

public String escape(String expression)
IParser interface.

Specified by:
escape in interface IParser