@Test public void testToString() { Model mo = new DefaultModel(); List<VM> vms = Util.newVMs(mo, 10); List<Node> ns = Util.newNodes(mo, 10); ReconfigurationPlan plan = makePlan(mo, ns, vms); Assert.assertFalse(new DependencyBasedPlanApplier().toString(plan).contains("null")); }
@Override public String toString(ReconfigurationPlan p) { Set<Action> sorted = new TreeSet<>(new TimedBasedActionComparator(true, true)); sorted.addAll(p.getActions()); StringBuilder b = new StringBuilder(); for (Action a : sorted) { b.append(a.getStart()).append(':').append(a.getEnd()).append(' ').append(a.toString()).append('\n'); } return b.toString(); }
TimeBasedPlanApplier extends DefaultPlanApplier { @Override public String toString(ReconfigurationPlan p) { Set<Action> sorted = new TreeSet<>(new TimedBasedActionComparator(true, true)); sorted.addAll(p.getActions()); StringBuilder b = new StringBuilder(); for (Action a : sorted) { b.append(a.getStart()).append(':').append(a.getEnd()).append(' ').append(a.toString()).append('\n'); } return b.toString(); } }
TimeBasedPlanApplier extends DefaultPlanApplier { @Override public String toString(ReconfigurationPlan p) { Set<Action> sorted = new TreeSet<>(new TimedBasedActionComparator(true, true)); sorted.addAll(p.getActions()); StringBuilder b = new StringBuilder(); for (Action a : sorted) { b.append(a.getStart()).append(':').append(a.getEnd()).append(' ').append(a.toString()).append('\n'); } return b.toString(); }  }
TimeBasedPlanApplier extends DefaultPlanApplier { @Override public String toString(ReconfigurationPlan p) { Set<Action> sorted = new TreeSet<>(new TimedBasedActionComparator(true, true)); sorted.addAll(p.getActions()); StringBuilder b = new StringBuilder(); for (Action a : sorted) { b.append(a.getStart()).append(':').append(a.getEnd()).append(' ').append(a.toString()).append('\n'); } return b.toString(); }  @Override Model apply(ReconfigurationPlan p); @Override String toString(ReconfigurationPlan p); }
TimeBasedPlanApplier extends DefaultPlanApplier { @Override public String toString(ReconfigurationPlan p) { Set<Action> sorted = new TreeSet<>(new TimedBasedActionComparator(true, true)); sorted.addAll(p.getActions()); StringBuilder b = new StringBuilder(); for (Action a : sorted) { b.append(a.getStart()).append(':').append(a.getEnd()).append(' ').append(a.toString()).append('\n'); } return b.toString(); }  @Override Model apply(ReconfigurationPlan p); @Override String toString(ReconfigurationPlan p);  }