@Test public void testConstructors() { assertNotNull(this.g.getEvents()); assertEquals(0, this.g.getEvents().size()); this.g = new EventGroup(this.event1); assertEquals(1, this.g.getEvents().size()); assertTrue(this.g.getEvents().contains(this.event1)); List<Event> l = new ArrayList<Event>(); l.add(this.event1); this.g = new EventGroup(l); assertEquals(1, this.g.getEvents().size()); assertTrue(this.g.getEvents().contains(this.event1)); Set<Event> s = new HashSet<Event>(); s.add(this.event1); this.g = new EventGroup(s); assertEquals(1, this.g.getEvents().size()); assertTrue(this.g.getEvents().contains(this.event1)); s.remove(this.event1); assertEquals(1, this.g.getEvents().size()); assertTrue(this.g.getEvents().contains(this.event1)); s.add(this.event2); s.add(this.event3); assertEquals(1, this.g.getEvents().size()); this.g = new EventGroup(s); assertEquals(2, this.g.getEvents().size()); }
public Set<Event> getEvents() { Set<Event> clone = new LinkedHashSet<Event>(this.events.size(), 1f); clone.addAll(this.events); return Collections.unmodifiableSet(clone); }
EventGroup { public Set<Event> getEvents() { Set<Event> clone = new LinkedHashSet<Event>(this.events.size(), 1f); clone.addAll(this.events); return Collections.unmodifiableSet(clone); } }
EventGroup { public Set<Event> getEvents() { Set<Event> clone = new LinkedHashSet<Event>(this.events.size(), 1f); clone.addAll(this.events); return Collections.unmodifiableSet(clone); } EventGroup();  EventGroup(List<Event> events);  EventGroup(Set<Event> events);  EventGroup(Event... events); }
EventGroup { public Set<Event> getEvents() { Set<Event> clone = new LinkedHashSet<Event>(this.events.size(), 1f); clone.addAll(this.events); return Collections.unmodifiableSet(clone); } EventGroup();  EventGroup(List<Event> events);  EventGroup(Set<Event> events);  EventGroup(Event... events); Set<Event> getEvents(); void addEvents(Event... events); void clearEvents(); Event getMainEvent(); @Override String toString(); }
EventGroup { public Set<Event> getEvents() { Set<Event> clone = new LinkedHashSet<Event>(this.events.size(), 1f); clone.addAll(this.events); return Collections.unmodifiableSet(clone); } EventGroup();  EventGroup(List<Event> events);  EventGroup(Set<Event> events);  EventGroup(Event... events); Set<Event> getEvents(); void addEvents(Event... events); void clearEvents(); Event getMainEvent(); @Override String toString();  }