1 package jp.sourceforge.stigmata;
3 import java.io.Serializable;
6 * element of birthmark.
8 * @author Haruaki TAMADA
10 public class BirthmarkElement implements Serializable{
11 private static final long serialVersionUID = 943675475343245243L;
19 * construct birthmark element with given value.
21 public BirthmarkElement(String value) {
26 * return the value of this element.
28 public Object getValue(){
36 public String toString(){
37 return String.valueOf(getValue());
41 * hash code for overriding equals method.
44 public int hashCode(){
45 if(getValue() == null){
49 return getValue().hashCode();
57 public boolean equals(Object o){
58 if(o instanceof BirthmarkElement){
59 if(getValue() != null){
60 return getValue().equals(((BirthmarkElement)o).getValue());
63 return ((BirthmarkElement)o).getValue() == null;