public void insertBeforeCurrent(E events) {

        if (lastReturned == null) {
            throw new IllegalStateException();
        }

        E currentEvent = getLastEvent(events);

        if (previousToLastReturned != null) {
            previousToLastReturned.setNext(events);
        } else {
            first = events;
        }
        previousToLastReturned = currentEvent;

        currentEvent.setNext(lastReturned);
    }
Collection used to group and manage chunk or ComplexEvents

@param <E> sub types of ComplexEvent such as StreamEvent and StateEvent
modules/siddhi-core/src/main/java/io/siddhi/core/event/ComplexEventChunk.java