if (events.getFirst() instanceof NaturalEventBean) {
for (EventBean theEvent : events)
{
EventBean inner = ((NaturalEventBean) theEvent).getOptionalSynthetic();
Object[] keys = reader.read(inner);
MultiKeyUntypedEventPair pair = new MultiKeyUntypedEventPair(keys, theEvent);
set.add(pair);
}
}
else {
for (EventBean theEvent : events)
{
Object[] keys = reader.read(theEvent);
MultiKeyUntypedEventPair pair = new MultiKeyUntypedEventPair(keys, theEvent);
set.add(pair);
}
}
EventBean[] result = new EventBean[set.size()];