question: public EventBean [ ] toArray ( ) { if ( firstEvent == null ) { return new EventBean [ 0 ] ; } if ( additionalEvents == null ) { return new EventBean [ ] { firstEvent } ; } EventBean [ ] events = new EventBean [ 1 + additionalEvents . size ( ) ] ; events [ 0 ] = firstEvent ; int count = 1 ; for ( EventBean theEvent : additionalEvents ) { events [ count ] = theEvent ; count ++ ; } return events ; }
target:  Returns an array holding the collected events.