protected boolean identityEquals(Identity identity){
  if (!name.equalsIgnoreCase(identity.name))   return false;
  if ((publicKey == null) ^ (identity.publicKey == null))   return false;
  if (publicKey != null && identity.publicKey != null)   if (!publicKey.equals(identity.publicKey))   return false;
  return true;
}

protected boolean identityEquals ( Identity identity ) { if ( ! name . equalsIgnoreCase ( identity . name ) ) return false ; if ( ( publicKey == null ) ^ ( identity . publicKey == null ) ) return false ; if ( publicKey != null && identity . publicKey != null ) if ( ! publicKey . equals ( identity . publicKey ) ) return false ; return true ; }
tests for equality between the specified identity and this identity . this method should be overriden by subclasses to test for equality . the default behavior is to return true if the names and public keys are equal .
