org.springframework.ldap.support.filter
Class NotFilter

java.lang.Object
  extended by org.springframework.ldap.support.filter.AbstractFilter
      extended by org.springframework.ldap.support.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.ecode());
 
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
 java.lang.StringBuffer encode(java.lang.StringBuffer buff)
          Prints the query with LDAP encoding to a stringbuffer
 boolean equals(java.lang.Object o)
          Compares key and value before encoding
 int hashCode()
          hash attribute and value
 
Methods inherited from class org.springframework.ldap.support.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 java.lang.StringBuffer encode(java.lang.StringBuffer buff)
Description copied from class: AbstractFilter
Prints the query with LDAP encoding to a stringbuffer

Specified by:
encode in interface Filter
Specified by:
encode in class AbstractFilter
Parameters:
buff - The stringbuffer
Returns:
The very same stringbuffer
See Also:
Filter.encode(java.lang.StringBuffer)

equals

public boolean equals(java.lang.Object o)
Compares key and value before encoding

Specified by:
equals in interface Filter
Overrides:
equals in class java.lang.Object
Returns:
true if the objects are equal.
See Also:
Filter.equals(java.lang.Object)

hashCode

public int hashCode()
hash attribute and value

Specified by:
hashCode in interface Filter
Overrides:
hashCode in class java.lang.Object
Returns:
hascode
See Also:
Filter.hashCode()


Copyright � 2002-2006. All Rights Reserved.