IParserModelLooseParserModelpublic class ParserModel extends java.lang.Object implements IParserModel
Format instances, supporting all the basic java typesComparator of Date instances.
IParser is automatically configured to use these Format instances, when created by the TableFilterHeader.Format or Comparator definitions, as the
class is used as a singleton.| Modifier and Type | Class | Description |
|---|---|---|
static class |
ParserModel.BooleanTypeFormat |
Factory to build boolean objects.
|
static class |
ParserModel.ByteTypeFormat |
Factory to build byte objects.
|
static class |
ParserModel.CharacterTypeFormat |
Factory to build character objects.
|
static class |
ParserModel.DoubleTypeFormat |
Factory to build double objects.
|
static class |
ParserModel.EnumTypeFormat |
Factory to build character objects.
|
static class |
ParserModel.FloatTypeFormat |
Factory to build float objects.
|
static class |
ParserModel.IntegerTypeFormat |
Factory to build integer objects.
|
static class |
ParserModel.LongTypeFormat |
Factory to build long objects.
|
static class |
ParserModel.ShortTypeFormat |
Factory to build short objects.
|
static class |
ParserModel.StringTypeFormat |
Factory to build string objects.
|
COMPARATOR_PROPERTY, FORMAT_PROPERTY, IGNORE_CASE_PROPERTY| Constructor | Description |
|---|---|
ParserModel() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener) |
Adds a
PropertyChangeListener.Any property change will be transmitted as an event |
protected IParser |
createParser(java.text.Format fmt,
java.util.Comparator cmp,
java.util.Comparator stringCmp,
boolean ignoreCase,
int modelIndex) |
Creates the parser as required with the given parameters
|
IParser |
createParser(IFilterEditor editor) |
Creates a text parser for the given editor.
|
java.util.Comparator |
getComparator(java.lang.Class cl) |
Returns the
Comparator for the given class. |
java.text.Format |
getFormat(java.lang.Class cl) |
Returns the
Format for the given class. |
java.util.Comparator<java.lang.String> |
getStringComparator(boolean noCase) |
Returns the
Comparator used for String comparisons. |
boolean |
isIgnoreCase() |
Returns true if the String comparator ignores case
Note that this is redundant information, which can be retrieved from the IParserModel.getComparator(Class) method with a String.class parameter. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener) |
Removes an existing
PropertyChangeListener. |
void |
setComparator(java.lang.Class cl,
java.util.Comparator cmp) |
Defines the
Comparator for the given class. |
void |
setFormat(java.lang.Class cl,
java.text.Format fmt) |
Defines the
Format for the given class. |
void |
setIgnoreCase(boolean set) |
Sets a String comparator that is case sensitive/insensitive.
|
static java.util.Comparator<java.lang.String> |
stringComparator(boolean ignoreCase) |
Returns a default singleton comparator for the given case flag.
|
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
IParserModelPropertyChangeListener.addPropertyChangeListener in interface IParserModelpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
IParserModelPropertyChangeListener.removePropertyChangeListener in interface IParserModelpublic IParser createParser(IFilterEditor editor)
IParserModelcreateParser in interface IParserModelprotected IParser createParser(java.text.Format fmt, java.util.Comparator cmp, java.util.Comparator stringCmp, boolean ignoreCase, int modelIndex)
public boolean isIgnoreCase()
IParserModelIParserModel.getComparator(Class) method with a String.class parameter.isIgnoreCase in interface IParserModelpublic void setIgnoreCase(boolean set)
IParserModelsetIgnoreCase in interface IParserModelpublic final java.text.Format getFormat(java.lang.Class cl)
Format for the given class.getFormat in interface IParserModelpublic final void setFormat(java.lang.Class cl,
java.text.Format fmt)
Format for the given class.setFormat in interface IParserModelpublic java.util.Comparator getComparator(java.lang.Class cl)
Comparator for the given class.getComparator in interface IParserModelpublic void setComparator(java.lang.Class cl,
java.util.Comparator cmp)
Comparator for the given class.setComparator in interface IParserModelpublic java.util.Comparator<java.lang.String> getStringComparator(boolean noCase)
IParserModelComparator used for String comparisons.getStringComparator in interface IParserModelpublic static java.util.Comparator<java.lang.String> stringComparator(boolean ignoreCase)
Copyright © 2018 coderazzi. All Rights Reserved.