commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1568693 - /commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml2/model/State.java
Date Sat, 15 Feb 2014 22:06:45 GMT
Author: ate
Date: Sat Feb 15 22:06:44 2014
New Revision: 1568693

URL: http://svn.apache.org/r1568693
Log:
code cleanup

Modified:
    commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml2/model/State.java

Modified: commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml2/model/State.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml2/model/State.java?rev=1568693&r1=1568692&r2=1568693&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml2/model/State.java (original)
+++ commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml2/model/State.java Sat
Feb 15 22:06:44 2014
@@ -38,12 +38,6 @@ public class State extends TransitionTar
     private Map<String, TransitionTarget> children;
 
     /**
-     * The Parallel child, which defines a set of parallel substates.
-     * May occur 0 or 1 times. Incompatible with the state or invoke property.
-     */
-    private Parallel parallel;
-
-    /**
      * The Invoke child, which defines an external process that should
      * be invoked, immediately after the onentry executable content,
      * and the transitions become candidates after the invoked
@@ -190,10 +184,7 @@ public class State extends TransitionTar
      * @return true if this is a simple state, otherwise false
      */
     public final boolean isSimple() {
-        if (parallel == null && children.isEmpty()) {
-            return true;
-        }
-        return false;
+        return children.isEmpty();
     }
 
     /**
@@ -202,10 +193,7 @@ public class State extends TransitionTar
      * @return true if this is a composite state, otherwise false
      */
     public final boolean isComposite() {
-        if (parallel == null && children.isEmpty()) {
-            return false;
-        }
-        return true;
+        return !children.isEmpty();
     }
 
     /**
@@ -216,10 +204,7 @@ public class State extends TransitionTar
      * @see Parallel
      */
     public final boolean isRegion() {
-        if (getParent() instanceof Parallel) {
-            return true;
-        }
-        return false;
+        return getParent() instanceof  Parallel;
     }
 
 }



Mime
View raw message