Package ca.odell.glazedlists.matchers
Class SearchEngineTextMatcherEditor.Field<E>
- java.lang.Object
-
- ca.odell.glazedlists.matchers.SearchEngineTextMatcherEditor.Field<E>
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- SearchEngineTextMatcherEditor<E>
public static final class SearchEngineTextMatcherEditor.Field<E> extends java.lang.Object implements java.io.Serializable
A Field object contains information specific to a given field found within the Objects being text matched. Specifically, a Field object describes two distinct things:- what the text is that identifies this Field when parsing the input text of
the
refilter
method - what TextFilterator to use when extracting all values to text search when matching an Object
SearchEngineTextMatcherEditor
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Field(java.lang.String name, TextFilterator<? super E> textFilterator)
Creates a field with a name andTextFilterator
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
getName()
Returns the text to be located which uniquely identifies this Field.TextFilterator<? super E>
getTextFilterator()
Returns the TextFilterator capable of extracting only the fields that should be considered by SearchTerms using this Field.int
hashCode()
-
-
-
Constructor Detail
-
Field
public Field(java.lang.String name, TextFilterator<? super E> textFilterator)
Creates a field with a name andTextFilterator
.- Parameters:
name
- uniquely identifies this Field relative to all other registered Field objectstextFilterator
- extracts only the field values to be considered when matching a given SearchTerm
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the text to be located which uniquely identifies this Field. For example, if this method returns "city", then filter text of "city:Toronto", when parsed, would construct a SearchTerm for "Toronto" that reports this Field object fromSearchTerm.getField()
.
-
getTextFilterator
public TextFilterator<? super E> getTextFilterator()
Returns the TextFilterator capable of extracting only the fields that should be considered by SearchTerms using this Field. It is this TextFilterator that contains the custom logic to return a much smaller subset of the total text-searchable fields on the object. Often the TextFilterators returned by this method only report the value of a single field from the Object being matched.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-