congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
CrossProduct.getChildren
Code IndexAdd Tabnine to your IDE (free)

How to use
getChildren
method
in
org.apache.taverna.workflowmodel.processor.iteration.CrossProduct

Best Java code snippets using org.apache.taverna.workflowmodel.processor.iteration.CrossProduct.getChildren (Showing top 4 results out of 315)

origin: org.apache.taverna.engine/taverna-workflowmodel-api

  @Override
  public int getIterationDepth(Map<String, Integer> inputDepths)
      throws IterationTypeMismatchException {
    if (isLeaf())
      // No children!
      throw new IterationTypeMismatchException(
          "Cross product with no children");
    int temp = 0;
    for (IterationStrategyNode child : getChildren())
      temp += child.getIterationDepth(inputDepths);
    return temp;
  }
}
origin: org.apache.taverna.engine/taverna-workflowmodel-api

@Test
public void addCrossProductMany() {
  crossProduct1.insert(dotProduct1);
  crossProduct1.insert(dotProduct2);
  crossProduct1.insert(input1);
  crossProduct1.insert(input2);
  crossProduct1.insert(crossProduct2);
  assertEquals(5, crossProduct1.getChildCount());
  assertEquals(Arrays.asList(dotProduct1, dotProduct2, input1, input2,
      crossProduct2), crossProduct1.getChildren());
  Enumeration<IterationStrategyNode> enumeration = crossProduct1
      .children();
  assertTrue(enumeration.hasMoreElements());
  assertEquals(dotProduct1, enumeration.nextElement());
  assertEquals(dotProduct2, enumeration.nextElement());
  assertEquals(input1, enumeration.nextElement());
  assertEquals(input2, enumeration.nextElement());
  assertEquals(crossProduct2, enumeration.nextElement());
  assertFalse(enumeration.hasMoreElements());
}
origin: org.apache.taverna.engine/taverna-workflowmodel-api

@Test
public void addCrossProduct() throws Exception {
  assertNull(crossProduct1.getParent());
  crossProduct1.setParent(root);
  assertEquals(root, crossProduct1.getParent());
  assertEquals(1, root.getChildCount());
  assertEquals(crossProduct1, root.getChildAt(0));
  assertEquals(Arrays.asList(crossProduct1), root.getChildren());
  assertEquals(0, crossProduct1.getChildCount());
  crossProduct1.insert(input1);
  assertEquals(input1, crossProduct1.getChildAt(0));
  crossProduct1.insert(input2, 0);
  assertEquals(input2, crossProduct1.getChildAt(0));
  assertEquals(input1, crossProduct1.getChildAt(1));
  assertEquals(2, crossProduct1.getChildCount());
  assertEquals(Arrays.asList(input2, input1), crossProduct1.getChildren());
  // A re-insert should move it
  crossProduct1.insert(input2, 2);
  assertEquals(2, crossProduct1.getChildCount());
  assertEquals(Arrays.asList(input1, input2), crossProduct1.getChildren());
  crossProduct1.insert(input2, 0);
  assertEquals(Arrays.asList(input2, input1), crossProduct1.getChildren());
  crossProduct1.insert(input1, 1);
  assertEquals(Arrays.asList(input2, input1), crossProduct1.getChildren());
}
origin: org.apache.taverna.engine/taverna-workflowmodel-api

@Test
public void moveNodeToDifferentParent() {
  crossProduct1.setParent(root);
  crossProduct1.insert(input1);
  crossProduct1.insert(dotProduct1);
  dotProduct1.insert(input2);
  dotProduct1.insert(crossProduct2);
  // Check tree
  assertEquals(crossProduct2, root.getChildAt(0).getChildAt(1)
      .getChildAt(1));
  assertEquals(Arrays.asList(input2, crossProduct2), dotProduct1
      .getChildren());
  crossProduct1.insert(crossProduct2, 1);
  assertEquals(Arrays.asList(input1, crossProduct2, dotProduct1),
      crossProduct1.getChildren());
  assertEquals(crossProduct1, crossProduct2.getParent());
  // Should no longer be in dotProduct1
  assertEquals(Arrays.asList(input2), dotProduct1.getChildren());
}
org.apache.taverna.workflowmodel.processor.iterationCrossProductgetChildren

Popular methods of CrossProduct

  • <init>
  • setParent
  • getChildCount
  • canClearCache
    Returns true iff completions have been received for all other inputs.
  • children
  • getChildAt
  • getCompletionState
  • getParent
  • insert
  • isLeaf
  • merge
  • pushJob
  • merge,
  • pushJob

Popular in Java

  • Making http requests using okhttp
  • getSharedPreferences (Context)
  • getSupportFragmentManager (FragmentActivity)
  • compareTo (BigDecimal)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now