private static void AddToChangeset(
            IEnumerable <MultiKey <EventBean> > newEvents,
            IEnumerable <MultiKey <EventBean> > oldEvents,
            OutputProcessViewConditionDeltaSet joinEventsSet)

        {
            // add the incoming events to the event batches
            ISet <MultiKey <EventBean> > copyNew;

            if (newEvents != null)
            {
                copyNew = new LinkedHashSet <MultiKey <EventBean> >(newEvents);
            }
            else
            {
                copyNew = new LinkedHashSet <MultiKey <EventBean> >();
            }

            ISet <MultiKey <EventBean> > copyOld;

            if (oldEvents != null)
            {
                copyOld = new LinkedHashSet <MultiKey <EventBean> >(oldEvents);
            }
            else
            {
                copyOld = new LinkedHashSet <MultiKey <EventBean> >();
            }

            joinEventsSet.AddJoin(new UniformPair <ISet <MultiKey <EventBean> > >(copyNew, copyOld));
        }
        // Posted events in ordered form (for applying to aggregates) and summarized per type
        // Using ArrayList as random access is a requirement.

        public OutputProcessViewConditionDefault(ResultSetProcessorHelperFactory resultSetProcessorHelperFactory, ResultSetProcessor resultSetProcessor, long?afterConditionTime, int?afterConditionNumberOfEvents, bool afterConditionSatisfied, OutputProcessViewConditionFactory parent, AgentInstanceContext agentInstanceContext, bool isJoin)
            : base(resultSetProcessorHelperFactory, agentInstanceContext, resultSetProcessor, afterConditionTime, afterConditionNumberOfEvents, afterConditionSatisfied)
        {
            _parent = parent;

            var outputCallback = GetCallbackToLocal(parent.StreamCount);

            _outputCondition = parent.OutputConditionFactory.Make(agentInstanceContext, outputCallback);
            _deltaSet        = resultSetProcessorHelperFactory.MakeOutputConditionChangeSet(isJoin, agentInstanceContext);
        }