class CountingBloomFilterBasedWindow {

    public List<ComplexEvent> find(String attributeName, Object value) {

        List<ComplexEvent> foundEventList = new ArrayList<ComplexEvent>();

        Key key = new Key(value.toString().getBytes());

        if (filter.membershipTest(key)) {
            Iterator<StreamEvent> iterator = eventQueue.iterator();

            while (iterator.hasNext()) {
                StreamEvent streamEvent = (StreamEvent) iterator.next();
                if (streamEvent.getAttribute(joinAttributeId).equals(value)) {
                    foundEventList.add(streamEvent);
                }
            }
        }
        return foundEventList;
    }

}