if (initSimulation && !counters.hasFired(fire)) { if (fire.contents instanceof SIRTwoStageFilter){    SIRTwoStageFilter two = (SIRTwoStageFilter)fire.contents; if (two.getInitPeek() == 0 && two.getInitPush() == 0 && two.getInitPop() == 0) { return two.getPeekInt();
if (initSimulation) { if (!counters.hasFired(fire)) { if (fire.contents instanceof SIRTwoStageFilter){    SIRTwoStageFilter two = (SIRTwoStageFilter)fire.contents; if (two.getInitPeek() == 0 && two.getInitPush() == 0 && two.getInitPop() == 0) { return two.getPeekInt(); } return ((SIRTwoStageFilter)fire.contents).getInitPeek();
    private int itemsNeededToFire(FlatNode fire, SimulationCounter counters)     {	if (initSimulation && !counters.hasFired(fire)) {	    if (fire.contents instanceof SIRTwoStageFilter){		//if the twostage does nothing in its initWork()		//then the initWork should not count as an execution		//return peek items as the needed items		SIRTwoStageFilter two = (SIRTwoStageFilter)fire.contents;		if (two.getInitPeek() == 0 &&		    two.getInitPush() == 0 &&		    two.getInitPop() == 0) {		    return two.getPeekInt();		}		return ((SIRTwoStageFilter)fire.contents).getInitPeek();	    }	    else 		return ((SIRFilter)fire.contents).getPeekInt();	}	else	    return ((SIRFilter)fire.contents).getPopInt();    }