public class NotFilter extends AbstractFilter
Filter filter = new NotFilter(new EqualsFilter("cn", "foo"); System.out.println(filter.encode());would result in:
(!(cn = foo))
Constructor and Description |
---|
NotFilter(Filter filter)
Create a filter that negates the outcome of the given
filter . |
Modifier and Type | Method and Description |
---|---|
StringBuffer |
encode(StringBuffer buff)
Encodes the filter to a StringBuffer.
|
boolean |
equals(Object o)
All filters must implement equals.
|
int |
hashCode()
All filters must implement hashCode.
|
encode, toString
public NotFilter(Filter filter)
filter
.filter
- The filter that should be negated.public StringBuffer encode(StringBuffer buff)
Filter
buff
- The StringBuffer to encode the filter topublic boolean equals(Object o)
Filter