@Test public void testOverlap2() { Action a = new MockAction(vm, 0, 4); Action b = new MockAction(vm, 0, 3); Assert.assertTrue(startCmp.compare(a, b) > 0); Assert.assertTrue(stopCmp.compare(a, b) > 0); }
@Override public int compare(Action a1, Action a2) { if (a1.equals(a2)) { return 0; } int d = delay(a1, a2, startBased); if (d == 0) { d = delay(a1, a2, !startBased); if (diffSimultaneous && d == 0) { return -1; } } return d; }
TimedBasedActionComparator implements Comparator<Action> { @Override public int compare(Action a1, Action a2) { if (a1.equals(a2)) { return 0; } int d = delay(a1, a2, startBased); if (d == 0) { d = delay(a1, a2, !startBased); if (diffSimultaneous && d == 0) { return -1; } } return d; } }
TimedBasedActionComparator implements Comparator<Action> { @Override public int compare(Action a1, Action a2) { if (a1.equals(a2)) { return 0; } int d = delay(a1, a2, startBased); if (d == 0) { d = delay(a1, a2, !startBased); if (diffSimultaneous && d == 0) { return -1; } } return d; } TimedBasedActionComparator();  TimedBasedActionComparator(boolean onStart, boolean diffSamePeriods); }
TimedBasedActionComparator implements Comparator<Action> { @Override public int compare(Action a1, Action a2) { if (a1.equals(a2)) { return 0; } int d = delay(a1, a2, startBased); if (d == 0) { d = delay(a1, a2, !startBased); if (diffSimultaneous && d == 0) { return -1; } } return d; } TimedBasedActionComparator();  TimedBasedActionComparator(boolean onStart, boolean diffSamePeriods); @Override int compare(Action a1, Action a2); }
TimedBasedActionComparator implements Comparator<Action> { @Override public int compare(Action a1, Action a2) { if (a1.equals(a2)) { return 0; } int d = delay(a1, a2, startBased); if (d == 0) { d = delay(a1, a2, !startBased); if (diffSimultaneous && d == 0) { return -1; } } return d; } TimedBasedActionComparator();  TimedBasedActionComparator(boolean onStart, boolean diffSamePeriods); @Override int compare(Action a1, Action a2);  }