Package org.springframework.ldap.filter
Class NotFilter
java.lang.Object
org.springframework.ldap.filter.AbstractFilter
org.springframework.ldap.filter.NotFilter
- All Implemented Interfaces:
Filter
A filter for 'not'. The following code:
Filter filter = new NotFilter(new EqualsFilter("cn", "foo");
System.out.println(filter.encode());
would result in:
(!(cn = foo))
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionencode(StringBuffer buff) Encodes the filter to a StringBuffer.booleanAll filters must implement equals.inthashCode()All filters must implement hashCode.Methods inherited from class org.springframework.ldap.filter.AbstractFilter
encode, toString
-
Constructor Details
-
NotFilter
Create a filter that negates the outcome of the givenfilter.- Parameters:
filter- The filter that should be negated.
-
-
Method Details
-
encode
Description copied from interface:FilterEncodes the filter to a StringBuffer.- Parameters:
buff- The StringBuffer to encode the filter to- Returns:
- The same StringBuffer as was given
-
equals
Description copied from interface:FilterAll filters must implement equals. -
hashCode
public int hashCode()Description copied from interface:FilterAll filters must implement hashCode.- Specified by:
hashCodein interfaceFilter- Overrides:
hashCodein classObject- Returns:
- the hash code according to the contract in
Object.hashCode()
-