All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ow2.bonita.iteration.IterationProcess Maven / Gradle / Ivy

The newest version!
package org.ow2.bonita.iteration;

import java.util.SortedMap;
import java.util.TreeMap;

public class IterationProcess {

  SortedMap nodes = new TreeMap();
  public void addNode(IterationNode node) {
    this.nodes.put(node.getName(), node);
  }
  public IterationNode getNode(String nodeName) {
    return nodes.get(nodeName);
  }
  public boolean hasNode(String name) {
    return nodes.containsKey(name);
  }
  public SortedMap getNodes() {
    return nodes;
  }
  
  public SortedMap getInitialActivities() {
    final SortedMap result = new TreeMap();
    for (IterationNode node : getNodes().values()) {
      if (!node.hasIncomingTransitions()) {
        result.put(node.getName(), node);
      }
    }
    return result;
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy