eventRate = Math.max(1, eventRate);
rate++;
}
List<Object> eventCompress = null;
AbstractEvent precEvt = null;
AbstractEvent evt = null;
while ((evt = eventQueue.peek()) != null) {
if (precEvt != null) {
if ((evt instanceof NodeEvent || evt instanceof EdgeEvent) && precEvt.getEventType().equals(evt.getEventType()) && precEvt.getView() == evt.getView()) { //Same type
if (eventCompress == null) {
eventCompress = new ArrayList<Object>();
eventCompress.add(precEvt.getData());
}
eventCompress.add(evt.getData());
} else {
break;
}
}
eventQueue.poll();