KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > SOFA > SOFAnode > Util > DFSRChecker > state > TransitionPair


1 /*
2  * $Id: TransitionPair.java,v 1.4 2005/07/08 12:04:12 kofron Exp $
3  *
4  * Copyright 2004
5  * Distributed Systems Research Group
6  * Department of Software Engineering
7  * Faculty of Mathematics and Physics
8  * Charles University, Prague
9  *
10  * Copyright 2005
11  * Formal Methods In Software Engineering Group
12  * Institute of Computer Science
13  * Academy of Sciences of the Czech Republic
14  *
15  * This code was developed by Jan Kofron <kofron@nenya.ms.mff.cuni.cz>
16  */

17
18
19 package SOFA.SOFAnode.Util.DFSRChecker.state;
20
21 import SOFA.SOFAnode.Util.DFSRChecker.node.ActionRepository;
22
23 /**
24  * Represents transition form one state to another. The members of this class
25  * are declared as public for better performance of the
26  * SOFA.SOFAnode.Util.objectweb.fractal.behprotocols.checker.
27  */

28 public class TransitionPair {
29
30     /** Creates a new instance of TransitionPair */
31     public TransitionPair(int eventindex, State state) {
32         this.eventIndex = eventindex;
33         this.state = state;
34     }
35
36     /**
37      * To string function
38      *
39      * @return the string representation of this transition pair
40      */

41     public String JavaDoc toString() {
42         return new String JavaDoc(repository.getItemString(eventIndex) + "->" + state.label);
43     }
44
45     /**
46      * Event index
47      */

48     final public int eventIndex;
49
50     /**
51      * Pointer to the state
52      */

53     final public State state;
54     
55     /**
56      * pointer to the repository - for debug reasons
57      */

58     static public ActionRepository repository;
59
60 }
Popular Tags