Spring LDAP

org.springframework.ldap.filter
Class NotFilter

java.lang.Object
  extended by org.springframework.ldap.filter.AbstractFilter
      extended by 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))
 

Author:
Adam Skogman

Constructor Summary
NotFilter(Filter filter)
          Create a filter that negates the outcome of the given filter.
 
Method Summary
 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.
 
Methods inherited from class org.springframework.ldap.filter.AbstractFilter
encode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NotFilter

public NotFilter(Filter filter)
Create a filter that negates the outcome of the given filter.

Parameters:
filter - The filter that should be negated.
Method Detail

encode

public StringBuffer encode(StringBuffer buff)
Description copied from interface: Filter
Encodes the filter to a StringBuffer.

Specified by:
encode in interface Filter
Specified by:
encode in class AbstractFilter
Parameters:
buff - The StringBuffer to encode the filter to
Returns:
The same StringBuffer as was given

equals

public boolean equals(Object o)
Description copied from interface: Filter
All filters must implement equals.

Specified by:
equals in interface Filter
Overrides:
equals in class Object
Returns:
true if the objects are equal.

hashCode

public int hashCode()
Description copied from interface: Filter
All filters must implement hashCode.

Specified by:
hashCode in interface Filter
Overrides:
hashCode in class Object
Returns:
the hash code according to the contract in Object.hashCode()

Spring LDAP