public final class SearchTerm<E>
extends java.lang.Object
implements java.io.Serializable
isNegated() returns true if the search term should
NOT appear within the target text
isRequired() returns true if the search term MUST be
used and cannot be discarded for any reason. (sometimes search engines
discard frivolous search terms like "and", "of", and "the".
getField() controls the TextFilterator that produces the
values to be searched when locating this SearchTerm. Specifically, a
null Field indicates the TextFilterator of the
TextMatcher will be used to produce values to be searched.
A non-null Field will be used to obtain the TextFilterator that
produces the values to be searched.
| Constructor and Description |
|---|
SearchTerm(java.lang.String text)
Construct a new
SearchTerm with the given text
that is neither negated nor required. |
SearchTerm(java.lang.String text,
boolean negated,
boolean required,
SearchEngineTextMatcherEditor.Field<E> field)
Construct a new
SearchTerm with the given text
that is negated and required according to the given booleans. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
SearchEngineTextMatcherEditor.Field<E> |
getField()
Returns the object that provides a custom TextFilterator to use when
locating this SearchTerm within an object.
|
java.lang.String |
getText()
Returns the text to be located within a target text.
|
int |
hashCode() |
boolean |
isNegated()
Returns true if the text must NOT be located within a target
text; false if the text MUST be located within a target text.
|
boolean |
isRequired()
Returns
true if this SearchTerm must be
included within a search and cannot be discarded for any reason. |
SearchTerm<E> |
newSearchTerm(java.lang.String text)
Return a new
SearchTerm with identical information save for
the given text. |
public SearchTerm(java.lang.String text)
SearchTerm with the given text
that is neither negated nor required.public SearchTerm(java.lang.String text,
boolean negated,
boolean required,
SearchEngineTextMatcherEditor.Field<E> field)
SearchTerm with the given text
that is negated and required according to the given booleans.public java.lang.String getText()
public boolean isNegated()
public boolean isRequired()
true if this SearchTerm must be
included within a search and cannot be discarded for any reason. For
example, even if it contains typically frivolous search text such as
"the", "and" or "of".public SearchEngineTextMatcherEditor.Field<E> getField()
null it indicates that the TextFilterator of the
TextMatcher should be used to extract values from a target object.public SearchTerm<E> newSearchTerm(java.lang.String text)
SearchTerm with identical information save for
the given text.public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.ObjectGlazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by swimmesberger at Mon Feb 25 11:02:37 CET 2019