1 17 18 19 20 package org.apache.lenya.workflow.impl; 21 22 import org.apache.lenya.workflow.State; 23 24 25 28 public class StateImpl implements State { 29 30 34 protected StateImpl(String stateId) { 35 id = stateId; 36 } 37 38 private String id; 39 40 44 public String getId() { 45 return id; 46 } 47 48 51 public String toString() { 52 return getId(); 53 } 54 55 58 public boolean equals(Object object) { 59 boolean result = false; 60 61 if (object instanceof StateImpl) { 62 result = getId().equals(((StateImpl) object).getId()); 63 } else { 64 result = super.equals(object); 65 } 66 67 return result; 68 } 69 70 73 public int hashCode() { 74 return getId().hashCode(); 75 } 76 } 77 | Popular Tags |