public class NotPresentFilter extends AbstractFilter
NOT
behavior with present
behavior to allow the user to check for the non-existence of a attribute. For
an attribute to be NOT present
it must not have any values set. To
filter on attributes at are present
use the PresentFilter
.
NotPresentFilter filter = new NotPresentFilter("foo"); System.out.println(filter.encode());would result in:
(!(foo=*))
Constructor and Description |
---|
NotPresentFilter(java.lang.String attribute)
Creates a new instance of a not present filter for a particular
attribute.
|
Modifier and Type | Method and Description |
---|---|
java.lang.StringBuffer |
encode(java.lang.StringBuffer buff)
Encodes the filter to a StringBuffer.
|
boolean |
equals(java.lang.Object o)
All filters must implement equals.
|
int |
hashCode()
All filters must implement hashCode.
|
encode, toString
public NotPresentFilter(java.lang.String attribute)
attribute
- the attribute expected to be not-present (ie, unset, or
null).public java.lang.StringBuffer encode(java.lang.StringBuffer buff)
Filter
encode
in interface Filter
encode
in class AbstractFilter
buff
- The StringBuffer to encode the filter topublic boolean equals(java.lang.Object o)
Filter