@Test(groups = "1s", timeOut=60000) public void testTransferInto() throws Exception { IntDecision d1 = dp.makeIntDecision(vars[0], DecisionOperatorFactory.makeIntEq(), 4); IntDecision d2 = dp.makeIntDecision(vars[1], DecisionOperatorFactory.makeIntEq(), 4); IntDecision d3 = dp.makeIntDecision(vars[2], DecisionOperatorFactory.makeIntEq(), 4); dp.pushDecision(d1); dp.pushDecision(d2); dp.pushDecision(d3); List<Decision> decisions = new ArrayList<>(); dp.transferInto(decisions, false); Assert.assertEquals(decisions.size(), 1); Assert.assertEquals(decisions.get(0), d3); }
public void transferInto(Collection<Decision> aList, boolean includeRootDecision) { for (int i = includeRootDecision ? 0 : 1; i < decisions.size(); i++) { aList.add(decisions.get(i)); } }
DecisionPath extends DecisionMaker implements Serializable { public void transferInto(Collection<Decision> aList, boolean includeRootDecision) { for (int i = includeRootDecision ? 0 : 1; i < decisions.size(); i++) { aList.add(decisions.get(i)); } } }
DecisionPath extends DecisionMaker implements Serializable { public void transferInto(Collection<Decision> aList, boolean includeRootDecision) { for (int i = includeRootDecision ? 0 : 1; i < decisions.size(); i++) { aList.add(decisions.get(i)); } } DecisionPath(IEnvironment environment); }
DecisionPath extends DecisionMaker implements Serializable { public void transferInto(Collection<Decision> aList, boolean includeRootDecision) { for (int i = includeRootDecision ? 0 : 1; i < decisions.size(); i++) { aList.add(decisions.get(i)); } } DecisionPath(IEnvironment environment); void buildNext(); void apply(); void pushDecision(Decision decision); void synchronize(); void synchronize(boolean free); Decision getLastDecision(); int size(); Decision getDecision(int i); void transferInto(Collection<Decision> aList, boolean includeRootDecision); String lastDecisionToString(); @Override String toString(); }
DecisionPath extends DecisionMaker implements Serializable { public void transferInto(Collection<Decision> aList, boolean includeRootDecision) { for (int i = includeRootDecision ? 0 : 1; i < decisions.size(); i++) { aList.add(decisions.get(i)); } } DecisionPath(IEnvironment environment); void buildNext(); void apply(); void pushDecision(Decision decision); void synchronize(); void synchronize(boolean free); Decision getLastDecision(); int size(); Decision getDecision(int i); void transferInto(Collection<Decision> aList, boolean includeRootDecision); String lastDecisionToString(); @Override String toString();  }