Author: rahul
Date: Tue Jan  8 12:50:46 2008
New Revision: 610144

URL: http://svn.apache.org/viewvc?rev=610144&view=rev
Log:
Type safety improvements.

Modified:
    
commons/proper/scxml/branches/J5/src/main/java/org/apache/commons/scxml/Status.java

Modified: 
commons/proper/scxml/branches/J5/src/main/java/org/apache/commons/scxml/Status.java
URL: 
http://svn.apache.org/viewvc/commons/proper/scxml/branches/J5/src/main/java/org/apache/commons/scxml/Status.java?rev=610144&r1=610143&r2=610144&view=diff
==============================================================================
--- 
commons/proper/scxml/branches/J5/src/main/java/org/apache/commons/scxml/Status.java
 (original)
+++ 
commons/proper/scxml/branches/J5/src/main/java/org/apache/commons/scxml/Status.java
 Tue Jan  8 12:50:46 2008
@@ -24,6 +24,7 @@
 import java.util.Set;
 
 import org.apache.commons.scxml.model.State;
+import org.apache.commons.scxml.model.TransitionTarget;
 
 /**
  * The encapsulation of the current state of a state machine.
@@ -39,12 +40,12 @@
     /**
      * The states that are currently active.
      */
-    private Set states;
+    private Set<TransitionTarget> states;
 
     /**
      * The events that are currently queued.
      */
-    private Collection events;
+    private Collection<TriggerEvent> events;
 
     /**
      * Have we reached a final configuration for this state machine.
@@ -78,8 +79,8 @@
      * Constructor.
      */
     public Status() {
-        states = new HashSet();
-        events = new ArrayList();
+        states = new HashSet<TransitionTarget>();
+        events = new ArrayList<TriggerEvent>();
     }
 
     /**
@@ -87,7 +88,7 @@
      *
      * @return Returns the states configuration - simple (leaf) states only.
      */
-    public Set getStates() {
+    public Set<TransitionTarget> getStates() {
         return states;
     }
 
@@ -96,7 +97,7 @@
      *
      * @return The events that are currently queued.
      */
-    public Collection getEvents() {
+    public Collection<TriggerEvent> getEvents() {
         return events;
     }
 
@@ -106,7 +107,7 @@
      * @return complete states configuration including simple states and their
      *         complex ancestors up to the root.
      */
-    public Set getAllStates() {
+    public Set<TransitionTarget> getAllStates() {
         return SCXMLHelper.getAncestorClosure(states, null);
     }
 


Reply via email to