List of usage examples for javax.naming.ldap LdapContext equals
public boolean equals(Object obj)
From source file:org.springframework.ldap.pool.DelegatingLdapContext.java
/** * @see java.lang.Object#equals(java.lang.Object) */// ww w.j av a2s . c om public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof LdapContext)) { return false; } final LdapContext thisLdapContext = this.getInnermostDelegateLdapContext(); LdapContext otherLdapContext = (LdapContext) obj; if (otherLdapContext instanceof DelegatingLdapContext) { otherLdapContext = ((DelegatingLdapContext) otherLdapContext).getInnermostDelegateLdapContext(); } return thisLdapContext == otherLdapContext || (thisLdapContext != null && thisLdapContext.equals(otherLdapContext)); }