01 /*
02 * Created on May 14, 2007
03 */
04 package com.x8ing.lsm4j.state;
05
06 import com.x8ing.lsm4j.StateMetaInformation;
07
08 /**
09 * A state.
10 *
11 * @author Patrick Heusser
12 */
13 public class StaticState {
14
15 private int uniqueID = -1;
16
17 private String description = null;
18
19 private StateMetaInformation stateMetaInformation = null;
20
21 public StaticState(int uniqueID, String description, StateMetaInformation stateMetaInformation) {
22 this(uniqueID, description);
23 setStateMetaInformation(stateMetaInformation);
24 }
25
26 public StaticState(int uniqueID, String description) {
27
28 this.uniqueID = uniqueID;
29 this.description = description;
30
31 }
32
33 public void addNextState() {
34
35 }
36
37 public int hashCode() {
38 return uniqueID;
39 }
40
41 public boolean equals(Object obj) {
42
43 if (obj == null || !(obj instanceof StaticState)) {
44 return false;
45 }
46
47 StaticState s2 = (StaticState) obj;
48
49 return this.uniqueID == s2.uniqueID;
50
51 }
52
53 public String toString() {
54 return "StaticState {uniqueID=" + uniqueID + " description=" + description + " }";
55 }
56
57 public String getUniqueIDString() {
58 return String.valueOf(uniqueID);
59 }
60
61 public int getUniqueID() {
62 return uniqueID;
63 }
64
65 public String getDescription() {
66 return description;
67 }
68
69 public StateMetaInformation getStateMetaInformation() {
70 return stateMetaInformation;
71 }
72
73 public void setStateMetaInformation(StateMetaInformation stateMetaInformation) {
74 this.stateMetaInformation = stateMetaInformation;
75 }
76 }
|