public class MatchFilter extends DocFilter
Constructor and Description |
---|
MatchFilter(java.lang.String fieldName,
java.lang.Object fieldValue)
Create the MatchFilter with the specified fieldName and fieldValue
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(DataRecord rec)
Return whether the DataRecord is accepted by this filter.
|
boolean |
equals(java.lang.Object obj)
Return true if this filter matches another object.
|
java.lang.String |
getField()
Get the field name for this filter
|
java.lang.String |
getValue()
Get the field value for this filter
|
int |
hashCode()
Return the hash code for this MatchFilter
|
boolean |
matchDoc(DocData doc)
Return whether the represented document is accepted by this filter.
|
java.lang.String |
toString()
Return a string representation of this filter.
|
accept, filterDocuments, getTag, setTag
filterRecords
public MatchFilter(java.lang.String fieldName, java.lang.Object fieldValue)
fieldName
- the name of the fieldfieldValue
- the value of the fieldpublic boolean accept(DataRecord rec)
accept
in class DataFilter
rec
- the data record to match.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object to testpublic java.lang.String getField()
public java.lang.String getValue()
public int hashCode()
hashCode
in class java.lang.Object
public boolean matchDoc(DocData doc)
public java.lang.String toString()
toString
in class java.lang.Object