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