1 17 18 package SOFA.SOFAnode.Util.DFSRChecker.node; 19 20 import java.util.ArrayList ; 21 import java.util.TreeSet ; 22 23 24 import SOFA.SOFAnode.Util.DFSRChecker.DFSR.CheckingException; 25 import SOFA.SOFAnode.Util.DFSRChecker.state.SimpleState; 26 import SOFA.SOFAnode.Util.DFSRChecker.state.State; 27 import SOFA.SOFAnode.Util.DFSRChecker.state.TransitionPair; 28 import SOFA.SOFAnode.Util.DFSRChecker.state.TransitionPairs; 29 import SOFA.SOFAnode.Util.DFSRChecker.utils.AnotatedProtocol; 30 31 32 35 public class NullNode extends TreeNode { 36 37 40 public NullNode() { 41 super("NULL"); 42 43 this.initial = new SimpleState(0); 44 this.transitions = new TransitionPairs(new TransitionPair[0]); 45 this.nodes = new TreeNode[0]; 46 } 47 48 51 public long getWeight() { 52 return 0; 53 } 54 55 58 public State getInitial() { 59 return this.initial; 60 } 61 62 65 public boolean isAccepting(State state) { 66 return true; 67 } 68 69 72 public TransitionPairs getTransitions(State state) throws InvalidParameterException, CheckingException { 73 return transitions; 74 } 75 76 79 public String [] getTypeName() { 80 String result[] ={"NULL_node", "NULL"}; 81 return result; 82 } 83 84 87 public TreeNode forwardCut(TreeSet livingevents) { 88 return this; 89 } 90 91 94 public AnotatedProtocol getAnotatedProtocol(State state) { 95 return new AnotatedProtocol("NULL", new ArrayList ()); 96 } 97 98 101 private SimpleState initial; 102 103 106 private TransitionPairs transitions; 107 108 } 109 | Popular Tags |