1 25 package org.objectweb.carol.jtests.conform.basic.server; 26 27 import java.io.Serializable ; 28 29 33 public class BasicSerializableObject implements Serializable { 34 35 38 private String name = null; 39 40 44 public BasicSerializableObject(String name) { 45 this.name = name; 46 } 47 48 53 public boolean equals(Object o) { 54 if (!(o instanceof BasicSerializableObject)) { 55 return false; 56 } 57 return getName().equals(((BasicSerializableObject) o).getName()); 58 } 59 60 63 public int hashCode() { 64 return name.hashCode(); 65 } 66 67 70 protected String getName() { 71 return name; 72 } 73 74 75 78 public String toString() { 79 return "BasicSerializableObject[" + getName() + "]"; 80 } 81 82 } 83 | Popular Tags |