public synchronized boolean propogateNextSignal() throws LemRuntimeException {  while ( delayedSignalSelfQueue.size() > 0) { DelayedSignal s = (DelayedSignal) delayedSignalSelfQueue.get( 0 ); if (s.getDeliveryTime() <= System.currentTimeMillis()) { delayedSignalSelfQueue.remove( s ); addSignalSelf(s); } else { break; } }  if ( signalSelfQueue.size() > 0 ) { Signal s = (Signal) signalSelfQueue.remove( 0 ); for ( Iterator i = instances.iterator(); i.hasNext(); ) { Instance in = ( Instance ) i.next(); in.addSignalSelf( s ); } return true;
public boolean propogateNextSignal() throws LemRuntimeException {
	public synchronized boolean propogateNextSignal() throws LemRuntimeException {		/*		 * First propogate any elapsed delayed signals to self		 * into the signalSelfQueue.		 */		while ( delayedSignalSelfQueue.size() > 0) {			DelayedSignal s = (DelayedSignal) delayedSignalSelfQueue.get( 0 );			if (s.getDeliveryTime() <= System.currentTimeMillis()) {				delayedSignalSelfQueue.remove( s );				addSignalSelf(s);			} else {				break;			}		}				if ( signalSelfQueue.size() > 0 ) {			Signal s = (Signal) signalSelfQueue.remove( 0 );			for ( Iterator i = instances.iterator(); i.hasNext(); ) {				Instance in = ( Instance ) i.next();				in.addSignalSelf( s );			}			return true;		} else if ( signalQueue.size() > 0 ) {			Signal s = (Signal) signalQueue.remove( 0 );			for ( Iterator i = instances.iterator(); i.hasNext(); ) {				Instance in = ( Instance ) i.next();				in.addSignal( s );			}			return true;		}		return false;	}