Package org.springframework.ldap.filter
Class NotFilter
- java.lang.Object
-
- org.springframework.ldap.filter.AbstractFilter
-
- org.springframework.ldap.filter.NotFilter
-
- All Implemented Interfaces:
Filter
public class NotFilter extends AbstractFilter
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))
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.-
Methods inherited from class org.springframework.ldap.filter.AbstractFilter
encode, toString
-
-
-
-
Constructor Detail
-
NotFilter
public NotFilter(Filter filter)
Create a filter that negates the outcome of the givenfilter
.- Parameters:
filter
- The filter that should be negated.
-
-
Method Detail
-
encode
public java.lang.StringBuffer encode(java.lang.StringBuffer buff)
Description copied from interface:Filter
Encodes the filter to a StringBuffer.- Parameters:
buff
- The StringBuffer to encode the filter to- Returns:
- The same StringBuffer as was given
-
equals
public boolean equals(java.lang.Object o)
Description copied from interface:Filter
All filters must implement equals.
-
-