Package org.uengine.kernel

Examples of org.uengine.kernel.ComplexActivity


      HumanActivity humanActivity = ((HumanActivity)act);
      int duration = humanActivity.getDuration();
      activityList.add(new ActivityPosition(humanActivity, currentFrom, currentFrom+duration));
      return duration;
    }else if(act instanceof AllActivity || act instanceof SwitchActivity){
      ComplexActivity complexActivity = (ComplexActivity)act;
      int maxOfDuration = 0;
      for(int i=0; i<complexActivity.getChildActivities().size(); i++){
        Activity child = (Activity) complexActivity.getChildActivities().get(i);
        int durationOfChild = traverse(child, currentFrom, context);
        if(durationOfChild > maxOfDuration) maxOfDuration = durationOfChild;       
      }
      return maxOfDuration;
    }else if(act instanceof ComplexActivity){
      int initialCurrentFrom = currentFrom;
      ComplexActivity complexActivity = (ComplexActivity)act;
      for(int i=0; i<complexActivity.getChildActivities().size(); i++){
        Activity child = (Activity) complexActivity.getChildActivities().get(i);
        currentFrom += traverse(child, currentFrom, context);
      }
     
      return currentFrom - initialCurrentFrom;
    }
View Full Code Here

TOP

Related Classes of org.uengine.kernel.ComplexActivity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.