1 22 package org.jboss.test.txtimer.support; 23 24 import java.io.Serializable ; 25 26 32 public class SimpleInfo implements Serializable 33 { 34 private String name; 35 36 public SimpleInfo(String name) 37 { 38 this.name = name != null ? name : ""; 39 } 40 41 public String getName() 42 { 43 return name; 44 } 45 46 public int hashCode() 47 { 48 return name.hashCode(); 49 } 50 51 public boolean equals(Object obj) 52 { 53 if (obj == this) return true; 54 55 if (obj instanceof SimpleInfo) 56 { 57 SimpleInfo other = (SimpleInfo)obj; 58 return name.equals(other.name); 59 } 60 return false; 61 } 62 63 public String toString() 64 { 65 return "SimpleInfo[name=" + name + "]"; 66 } 67 } | Popular Tags |