/ Published in: Java
metodo para generar hashcodes
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
int hashCode = 0; @Override public int hashCode() { if (this.hashCode == 0) { return genericHash(this.id_otro_responsable,getId_persona()); } return id_otro_responsable; } public static int genericHash(int... fieldHashes) { int result = 17; for (int hash : fieldHashes) { result = 37 * result + hash; } return result; }