public abstract class CompareFilter extends AbstractFilter
| Constructor and Description |
|---|
CompareFilter(String attribute,
int value)
Convenience constructor for
int values. |
CompareFilter(String attribute,
String value) |
| Modifier and Type | Method and Description |
|---|---|
StringBuffer |
encode(StringBuffer buff)
Encodes the filter to a StringBuffer.
|
protected String |
encodeValue(String value)
Override to perform special encoding in subclass.
|
boolean |
equals(Object o)
Compares key and value before encoding.
|
protected abstract String |
getCompareString()
Implement this method in subclass to return a String representing the
operator.
|
int |
hashCode()
Calculate the hash code for the attribute and the value.
|
encode, toStringpublic CompareFilter(String attribute, int value)
int values.attribute - Name of attribute in filter.value - The value of the attribute in the filter.protected String encodeValue(String value)
value - the value to encode.public StringBuffer encode(StringBuffer buff)
Filterencode in interface Filterencode in class AbstractFilterbuff - The StringBuffer to encode the filter topublic boolean equals(Object o)
equals in interface Filterequals in class Objecttrue if the objects are equal.Filter.equals(java.lang.Object)public int hashCode()
hashCode in interface FilterhashCode in class ObjectObject.hashCode()Filter.hashCode()protected abstract String getCompareString()
EqualsFilter.getCompareString() would for example
return an equals sign, "=".