if (source != null && source.getIOField ("streamOutput") != null)
if (source != null && source.getOutputChannel () != null)
    public void connectGraph ()    {        // make sure I have some elements - not sure what to do otherwise        ASSERT (!streamElements.isEmpty ());        // go through the list and connect it together:        try        {            ListIterator childIter;            childIter = (ListIterator) streamElements.iterator ();            Stream source = null;            while (childIter.hasNext ())            {                // advance the iterator:                Stream sink = (Stream) childIter.next ();                ASSERT (sink != null);                // setup the sink itself                sink.setupOperator ();                if (source != null && source.getIOField ("streamOutput") != null)                {                    // create and connect a pass filter                    ChannelConnectFilter connect = new ChannelConnectFilter ();                    Channel in = source.getIOField ("streamOutput");                    Channel out = sink.getIOField ("streamInput");                    connect.useChannels (in, out);                }                source = sink;            }        }        catch (NoSuchElementException error)        {            // this should never happen            ASSERT (false);        }        // set myself up with proper input and output        {            streamInput = ((Stream)streamElements.getFirst ()).getIOField ("streamInput");            streamOutput = ((Stream)streamElements.getLast ()).getIOField ("streamOutput");        }    }