List of usage examples for javax.naming.directory DirContext equals
public boolean equals(Object obj)
From source file:org.springframework.ldap.pool.DelegatingDirContext.java
/** * @see java.lang.Object#equals(java.lang.Object) */// w w w.j av a 2s . c om public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof DirContext)) { return false; } final DirContext thisDirContext = this.getInnermostDelegateDirContext(); DirContext otherDirContext = (DirContext) obj; if (otherDirContext instanceof DelegatingDirContext) { otherDirContext = ((DelegatingDirContext) otherDirContext).getInnermostDelegateDirContext(); } return thisDirContext == otherDirContext || (thisDirContext != null && thisDirContext.equals(otherDirContext)); }