1 25 26 28 package org.objectweb.jonas.jtests.beans.inherit; 29 30 32 public class IdPK extends BasicIdPK { 33 34 public int idBis; 35 36 public IdPK(int id) { 37 super(id); 38 this.idBis = 0; 39 } 40 41 public IdPK() { 42 super(); 43 this.idBis = 0; 44 } 45 46 public int hashCode() { 47 return (super.hashCode()+idBis); 48 } 49 50 public boolean equals(Object other) { 51 boolean isEqual = super.equals(other); 52 if (isEqual) { 53 if (other instanceof IdPK) { 54 isEqual = (idBis == ((IdPK)other).idBis); 55 } 56 } 57 return isEqual ; 58 } 59 60 } 61 | Popular Tags |