public Collection<StreamEvent> findEvents(StateEvent matchingEvent, IndexedEventHolder indexedEventHolder) {
        Collection<StreamEvent> notStreamEvents = notCollectionExecutor.findEvents(matchingEvent, indexedEventHolder);
        if (notStreamEvents == null) {
            return null;
        } else if (notStreamEvents.size() == 0) {
            return indexedEventHolder.getAllEvents();
        } else {
            Collection<StreamEvent> allEvents = indexedEventHolder.getAllEvents();
            Set<StreamEvent> returnSet = new HashSet<StreamEvent>();
            for (StreamEvent aEvent : allEvents) {
                if (!notStreamEvents.contains(aEvent)) {
                    returnSet.add(aEvent);
                }
            }
            return returnSet;
        }
    }
Implementation of {@link CollectionExecutor} which handles not condition.
modules/siddhi-core/src/main/java/io/siddhi/core/util/collection/executor/NotCollectionExecutor.java