2 class IdentityRelation {
6 public IdentityRelation(String fieldname1,String fieldname2) {
7 this.fieldname1=fieldname1;
8 this.fieldname2=fieldname2;
10 public String toString() {
11 return fieldname1+"."+fieldname2;
14 public int hashCode() {
15 return fieldname1.hashCode()^fieldname2.hashCode();
18 public boolean equals(Object obj) {
19 if (obj instanceof IdentityRelation) {
20 IdentityRelation ir=(IdentityRelation) obj;
21 if (fieldname1.equals(ir.fieldname1)&&
22 fieldname2.equals(ir.fieldname2))