@Test public void testDistinctEventsByCompletionTime() { assertEquals(Arrays.asList(event1, event2), handlingHistory.getDistinctEventsByCompletionTime()); }
public List<HandlingEvent> getDistinctEventsByCompletionTime() { List<HandlingEvent> ordered = new ArrayList<>(new HashSet<>( handlingEvents)); Collections.sort(ordered, BY_COMPLETION_TIME_COMPARATOR); return Collections.unmodifiableList(ordered); }
HandlingHistory { public List<HandlingEvent> getDistinctEventsByCompletionTime() { List<HandlingEvent> ordered = new ArrayList<>(new HashSet<>( handlingEvents)); Collections.sort(ordered, BY_COMPLETION_TIME_COMPARATOR); return Collections.unmodifiableList(ordered); } }
HandlingHistory { public List<HandlingEvent> getDistinctEventsByCompletionTime() { List<HandlingEvent> ordered = new ArrayList<>(new HashSet<>( handlingEvents)); Collections.sort(ordered, BY_COMPLETION_TIME_COMPARATOR); return Collections.unmodifiableList(ordered); } HandlingHistory(Collection<HandlingEvent> handlingEvents); }
HandlingHistory { public List<HandlingEvent> getDistinctEventsByCompletionTime() { List<HandlingEvent> ordered = new ArrayList<>(new HashSet<>( handlingEvents)); Collections.sort(ordered, BY_COMPLETION_TIME_COMPARATOR); return Collections.unmodifiableList(ordered); } HandlingHistory(Collection<HandlingEvent> handlingEvents); List<HandlingEvent> getAllHandlingEvents(); List<HandlingEvent> getDistinctEventsByCompletionTime(); HandlingEvent getMostRecentlyCompletedEvent(); @Override boolean equals(Object o); @Override int hashCode(); }
HandlingHistory { public List<HandlingEvent> getDistinctEventsByCompletionTime() { List<HandlingEvent> ordered = new ArrayList<>(new HashSet<>( handlingEvents)); Collections.sort(ordered, BY_COMPLETION_TIME_COMPARATOR); return Collections.unmodifiableList(ordered); } HandlingHistory(Collection<HandlingEvent> handlingEvents); List<HandlingEvent> getAllHandlingEvents(); List<HandlingEvent> getDistinctEventsByCompletionTime(); HandlingEvent getMostRecentlyCompletedEvent(); @Override boolean equals(Object o); @Override int hashCode(); static final HandlingHistory EMPTY; }