1 7 package org.jboss.cache.pojo.test; 8 9 12 @org.jboss.cache.pojo.annotation.Replicable 14 public class IdObject 15 { 16 17 private String id; 18 19 public IdObject() 20 { 21 } 23 public IdObject(String aId) 24 { 25 id = aId; 26 } 28 29 public String toString() 30 { 31 return id; 32 } 34 public boolean equals(Object aObject) 35 { 36 boolean result = false; 37 38 if ((aObject != null) && 39 (aObject.getClass().getName().equals(this.getClass().getName()))) 40 { 41 if (id.equals(((IdObject) aObject).id)) 42 { 43 result = true; 44 } } 47 return result; 48 } 50 public int hashCode() 51 { 52 return id.hashCode(); 53 } } 56 | Popular Tags |