Source Code Cross Referenced for IStatePro.java in  » Net » Terracotta » com » tc » jrexx » set » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » Terracotta » com.tc.jrexx.set 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * 01/07/2003 - 15:19:32
003:         *
004:         * IStatePro.java -
005:         * Copyright (C) 2003 Buero fuer Softwarearchitektur GbR
006:         * ralf.meyer@karneim.com
007:         * http://jrexx.sf.net
008:         *
009:         * This program is free software; you can redistribute it and/or
010:         * modify it under the terms of the GNU Lesser General Public License
011:         * as published by the Free Software Foundation; either version 2
012:         * of the License, or (at your option) any later version.
013:         *
014:         * This program is distributed in the hope that it will be useful,
015:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
016:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
017:         * GNU Lesser General Public License for more details.
018:         *
019:         * You should have received a copy of the GNU Lesser General Public License
020:         * along with this program; if not, write to the Free Software
021:         * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
022:         */
023:        package com.tc.jrexx.set;
024:
025:        import com.tc.jrexx.set.ISet_char;
026:
027:        /**
028:         * This interface represents a state of an automaton created via the automaton's addState method.
029:         * <p>Copyright: Copyright (c) 2002</p>
030:         * <p>Company: Büro für Softwarearchitektur   www.karneim.com</p>
031:         * @author Ralf Meyer
032:         * @version 1.0
033:         */
034:        public interface IStatePro {
035:            public interface ITransition {
036:                public IStatePro getFromState();
037:
038:                public ISet_char getCharSet();
039:
040:                public IStatePro getToState();
041:            }
042:
043:            /**
044:             * The listener interface for receiving visit events of an IStatePro.
045:             * The class that is interested in processing a state's visit event implements this interface.
046:             * A listener instance of that class is registered with the state using the state's addVisitListener method.
047:             * <br>A state will be visited every time it is the destination state of a transition that has been visited.
048:             * <br>A state that becomes visited, will then visit all its epsilon transitions
049:             * and these transitions will visit all destination states and so on.
050:             * <br>State visiting occurs using the methods
051:             * <br>IStatePro.visit
052:             * <br>IState.next
053:             *
054:             * <p>Copyright: Copyright (c) 2002</p>
055:             * <p>Company: Büro für Softwarearchitektur   www.karneim.com</p>
056:             * @author Ralf Meyer
057:             * @version 1.0
058:             */
059:            public interface IVisitListener {
060:
061:                /**
062:                 * The state invokes this method on all registered listener if it is visited through an epsilon transition.
063:                 * @param state
064:                 */
065:                public void stateVisited(IStatePro state);
066:
067:                /**
068:                 * The state invokes this method on all registered listener if it is visited through an transition with char ch.
069:                 */
070:                public void stateVisited(IStatePro state, char ch);
071:
072:                public void stateUnVisited(IStatePro state);
073:            }
074:
075:            /**
076:             * The listener interface for receiving change events of an IStatePro.
077:             * The class that is interested in processing a state's change event implements this interface.
078:             * A listener instance of that class is registered with the state using the state's addChangeListener method.
079:             * <p>Copyright: Copyright (c) 2002</p>
080:             * <p>Company: Büro für Softwarearchitektur   www.karneim.com</p>
081:             * @author Ralf Meyer
082:             * @version 1.0
083:             */
084:            public interface IChangeListener {
085:                /**
086:                 * The state invokes this method on all registered listener if a transition is added to the state
087:                 */
088:                public void transitionAdded(IStatePro.ITransition transition);
089:
090:                /**
091:                 * The state invokes this method on all registered listener if a transition is removed from the state
092:                 */
093:                public void transitionRemoved(IStatePro.ITransition transition);
094:
095:                /**
096:                 * The state invokes this method on all registered listener if it's final property is changed.
097:                 */
098:                public void isFinalChanged(IStatePro state, boolean isFinal);
099:            }
100:
101:            public void addVisitListener(IStatePro.IVisitListener listener);
102:
103:            public boolean removeVisitListener(IStatePro.IVisitListener listener);
104:
105:            public void addChangeListener(IStatePro.IChangeListener listener);
106:
107:            public boolean removeChangeListener(
108:                    IStatePro.IChangeListener listener);
109:
110:            /**
111:             * @return true if the state is a final state else false
112:             */
113:            public boolean isFinal();
114:
115:            /**
116:             * Makes this state final or non final.
117:             */
118:            public void setFinal(boolean isFinal);
119:
120:            /**
121:             * Adds a new transition to this state.
122:             * The transition is defined by it's character set <CODE>charSet</CODE> and it's destionation
123:             * state <CODE>toState</CODE>, so that you can transit from this state to the destination state
124:             * only with a character contained in <CODE>charSet</CODE>. There is only one exception,
125:             * if <CODE>charSet</CODE> is null, an epsilon transition will be added, which means that there
126:             * are no chars needed to get to the destinationState <CODE>toState</CODE>; in other words a
127:             * state that has an epsilon transition can get through this epsilon transition to the destination
128:             * state <CODE>toState</CODE> without any char, so that we can say that <CODE>toState</CODE> melts
129:             * into the state.
130:             * @param charSet the characters for this transition
131:             * @param toState the destination state where to transit to
132:             * @return the new transition
133:             */
134:            public IStatePro.ITransition addTransition(ISet_char charSet,
135:                    IStatePro toState);
136:
137:            /**
138:             * Removes the specified transition from this state.
139:             * <br>important: the specified transition must be a transition
140:             * created via this state's addTransition method, otherwise an IllegalArgumentException is thrown
141:             * @param transition
142:             * @return true if transition was a transition of this state else false
143:             */
144:            public boolean removeTransition(IStatePro.ITransition transition);
145:
146:            public void removeAllTransitions();
147:
148:            public IStatePro.ITransition[] getTransitions();
149:
150:            public IStatePro.ITransition[] getETransitions();
151:
152:            public IStatePro.ITransition[] getAllTransitions();
153:
154:            /**
155:             * Returns all states that are reachable from this state through it's transitions and so on.
156:             * <br>important: this state is only element of the returned set, if it is an element of a loop
157:             * @return all reachable states as a set
158:             */
159:            public StateProSet getAllReachableStates();
160:
161:            /**
162:             * Visits this state with an epsilon transition and returns its epsilon closure.
163:             * @return the epsilon closure of this state
164:             */
165:            public IState visit();
166:
167:            public int getStateNumber();
168:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.