/** * Returns a hash code for the object. This method is supported for the * benefit of hashtables such as those provided by java.util.Hashtable. * * @return the integer 0 if description is null; otherwise a unique integer. */ @Override public int hashCode() { int result = 17; final int mult = 37; /*if (this.identity != null && this.identity.length > 0) { for (int i = 0; i < this.identity.length; i++) { result = mult * result + (int) this.identity[i]; } }*/ result = this.id.hashCode(); result = mult * result + this.code; return result; }
/** * Returns a hash code for the object. This method is supported for the * benefit of hashtables such as those provided by java.util.Hashtable. * * @return the integer 0 if description is null; otherwise a unique integer. */ @Override public int hashCode() { int result = 17; final int mult = 37; /*if (this.identity != null && this.identity.length > 0) { for (int i = 0; i < this.identity.length; i++) { result = mult * result + (int) this.identity[i]; } }*/ result = this.id.hashCode(); result = mult * result + this.code; return result; }
static ClientUserAuths getClientUserAuths(ClientProxyMembershipID proxyId) { ClientUserAuths cua = new ClientUserAuths(proxyId.hashCode()); ClientUserAuths retCua = proxyIdVsClientUserAuths.putIfAbsent(proxyId, cua); if(retCua == null) return cua; return retCua; }
static ClientUserAuths getClientUserAuths(ClientProxyMembershipID proxyId) { ClientUserAuths cua = new ClientUserAuths(proxyId.hashCode()); ClientUserAuths retCua = proxyIdVsClientUserAuths.putIfAbsent(proxyId, cua); if(retCua == null) return cua; return retCua; }