public class RangeFilter extends DocFilter
Constructor and Description |
---|
RangeFilter(java.lang.String fieldName,
java.lang.Comparable<?> lowerValue,
java.lang.Comparable<?> upperValue)
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.Comparable<?> |
getLowerValue()
Return the lower value for this filter
|
java.lang.Comparable<?> |
getUpperValue()
Return the upper 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.
|
void |
setStrictFlag(boolean flag)
Set the Strict flag.
|
java.lang.String |
toString()
Return a string representation of this filter.
|
accept, filterDocuments, getTag, setTag
filterRecords
public RangeFilter(java.lang.String fieldName, java.lang.Comparable<?> lowerValue, java.lang.Comparable<?> upperValue)
fieldName
- the name of the fieldlowerValue
- the lower extent of the rangeupperValue
- the upper extent of the rangepublic 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.Comparable<?> getLowerValue()
public java.lang.Comparable<?> getUpperValue()
public int hashCode()
hashCode
in class java.lang.Object
public boolean matchDoc(DocData doc)
public void setStrictFlag(boolean flag)
flag
- whether to require all values to be within the rangepublic java.lang.String toString()
toString
in class java.lang.Object