1 17 18 19 package SOFA.SOFAnode.Util.DFSRChecker.state; 20 21 27 public class IndexState extends State { 28 29 30 public IndexState(int index, State[] states) { 31 this.index = index; 32 this.states = states; 33 } 34 35 38 public boolean equals(State another) { 39 if (!(another instanceof IndexState)) 40 return false; 41 42 IndexState istate = (IndexState) another; 43 44 if (this.index != istate.index) 45 return false; 46 47 if (this.signature == null) 48 this.getSignature(); 49 50 if (another.signature == null) 51 another.getSignature(); 52 53 return this.getSignature().equals(istate.getSignature()); 54 } 55 56 59 protected void createSignature() { 60 for (int i = 0; i < states.length; ++i) { 61 this.signature.concat(states[i].getSignature()); 62 } 63 } 64 65 66 69 final public State[] states; 70 71 74 final public int index; 75 76 77 } | Popular Tags |