public StreamEvent find(StateEvent matchingEvent, IndexedEventHolder indexedEventHolder, StreamEventCloner
            storeEventCloner) {

        Collection<StreamEvent> notStreamEvents = notCollectionExecutor.findEvents(matchingEvent, indexedEventHolder);
        if (notStreamEvents == null) {
            return exhaustiveCollectionExecutor.find(matchingEvent, indexedEventHolder, storeEventCloner);
        } else if (notStreamEvents.size() == 0) {
            ComplexEventChunk<StreamEvent> returnEventChunk = new ComplexEventChunk<StreamEvent>();
            Collection<StreamEvent> storeEventSet = indexedEventHolder.getAllEvents();

            for (StreamEvent storeEvent : storeEventSet) {
                if (storeEventCloner != null) {
                    returnEventChunk.add(storeEventCloner.copyStreamEvent(storeEvent));
                } else {
                    returnEventChunk.add(storeEvent);
                }
            }
            return returnEventChunk.getFirst();
        } else {
            Collection<StreamEvent> allEvents = indexedEventHolder.getAllEvents();
            ComplexEventChunk<StreamEvent> returnEventChunk = new ComplexEventChunk<StreamEvent>();
            for (StreamEvent aEvent : allEvents) {
                if (!notStreamEvents.contains(aEvent)) {
                    if (storeEventCloner != null) {
                        returnEventChunk.add(storeEventCloner.copyStreamEvent(aEvent));
                    } else {
                        returnEventChunk.add(aEvent);
                    }
                }
            }
            return returnEventChunk.getFirst();
        }
    }
Implementation of {@link CollectionExecutor} which handles not condition.
modules/siddhi-core/src/main/java/io/siddhi/core/util/collection/executor/NotCollectionExecutor.java