1 7 8 package org.jboss.test.jbossnet.ejbsimple; 9 10 17 18 public class HelloData implements java.io.Serializable 19 { 20 static final long serialVersionUID = 3470987363548611533L; 21 private String name; 22 23 public String getName() 24 { 25 return name; 26 } 27 28 public void setName(String name) 29 { 30 this.name = name; 31 } 32 33 public boolean equals(Object obj) 34 { 35 if (this == obj) 36 return true; 37 if (obj == null || (obj instanceof HelloData) == false) 38 return false; 39 HelloData other = (HelloData) obj; 40 if (name == null && other.name == null) 41 return true; 42 if (name == null && other.name != null) 43 return false; 44 return (name.equals(other.name)); 45 } 46 47 public int hashCode() 48 { 49 if (name == null) 50 return 0; 51 else 52 return name.hashCode(); 53 } 54 } 55 | Popular Tags |