Top Description Methods
org.controlsfx.control.tableview2.filter.parser

public Interface Parser<T>

Known Direct Implementers
impl.org.controlsfx.tableview2.filter.parser.number.NumberParser, impl.org.controlsfx.tableview2.filter.parser.string.StringParser
Type Parameters
<T>
Type of input to the Parser
Imports
impl.org.controlsfx.tableview2.filter.parser.aggregate.AggregatorsParser, .AggregatorsParser.Aggregation, java.util.List, .Optional, java.util.function.Predicate

A parser accepts a string and returns a Predicate depending on its implementation.

Method Summary

Modifier and TypeMethod and Description
public default Predicate<T>

Returns:

A predicated by aggregating the text or null if the text cannot be aggregated.
aggregate
(String
The text on which aggregation is to be performed
text
)

Aggregates a text i.e. performs aggregation before parsing the text.

public String

Returns:

An error message if the parse fails.
getErrorMessage
()

A string with the error message if the parser fails to parse the supplied string.

public String

Returns:

A symbol.
getSymbol
(String
The operator text
text
)

Return the symbol related to an operator text which can be used with this parser.

public boolean

Returns:

true if text is valid, else returns false.
isValid
(String
The text to be validated.
text
)

Checks if the supplied text is valid or not.

public List<String>

Returns:

A list of operators.
operators
()

Returns the list of operators which can be used with this parser.

public Predicate<T>
parse(String text)

Method Detail

aggregateback to summary
public default Predicate<T> aggregate(String text)

Aggregates a text i.e. performs aggregation before parsing the text.

Parameters
text:String

The text on which aggregation is to be performed

Returns:Predicate<T>

A predicated by aggregating the text or null if the text cannot be aggregated.

getErrorMessageback to summary
public String getErrorMessage()

A string with the error message if the parser fails to parse the supplied string.

Returns:String

An error message if the parse fails.

getSymbolback to summary
public String getSymbol(String text)

Return the symbol related to an operator text which can be used with this parser.

Parameters
text:String

The operator text

Returns:String

A symbol.

isValidback to summary
public boolean isValid(String text)

Checks if the supplied text is valid or not.

Parameters
text:String

The text to be validated.

Returns:boolean

true if text is valid, else returns false.

operatorsback to summary
public List<String> operators()

Returns the list of operators which can be used with this parser.

Returns:List<String>

A list of operators.

parseback to summary
public Predicate<T> parse(String text)