private static SpoutNode getDRPCSpoutNode(Collection<Node> g) {
        for(Node n: g) {
            if(n instanceof SpoutNode) {
                SpoutNode.SpoutType type = ((SpoutNode) n).type;
                if(type==SpoutNode.SpoutType.DRPC) {
                    return (SpoutNode) n;
                }
            }
        }
        return null;
    }
private static SpoutNode getDRPCSpoutNode ( Collection < Node > g ) { for ( Node n : g ) { if ( n instanceof SpoutNode ) { SpoutNode . SpoutType type = ( ( SpoutNode ) n ) . type ; if ( type == SpoutNode . SpoutType . DRPC ) { return ( SpoutNode ) n ; } } } return null ; }
returns null if it's not a drpc group