/** {@inheritDoc} */ @Override public List<Record> signalStartTrack(Record signal) { //(queue track) this.queuedTracks.addLast(signal); //(push info) if(info != null){ this.trackStack.push(info); } info = new TrackInfo(signal.content.toString(), signal.timesstamp); //(force print) if(signal.force()){ updateTracks(signal.depth+1); } //(return) return EMPTY; //don't send extra records }
public List<Record> handle(Record record) { boolean isPrinting = false; if(record.force()){
/** {@inheritDoc} */ @Override public List<Record> signalStartTrack(Record signal) { //(handle record) List<Record> willReturn = new ArrayList<>(); boolean isPrinting = internalHandle(signal, willReturn); //(adjust state for track) if(!signal.force()){ if(isPrinting){ current.trackCountPending = PendingType.PRINTING; current.timesPrinted -= 1; }else{ current.trackCountPending = PendingType.SEEN; } current.timesSeen -= 1; } //(push stack) stack.push(current); current = new RepeatedRecordInfo(); if(!isPrinting){ current.suppressRecord = true; } return willReturn; }
public List<Record> handle(Record record) { boolean isPrinting = false; if(record.force()){
public List<Record> handle(Record record) { boolean isPrinting = false; if(record.force()){
if(record.force()){
/** {@inheritDoc} */ @Override public List<Record> signalStartTrack(Record signal) { //(handle record) List<Record> willReturn = new ArrayList<>(); boolean isPrinting = internalHandle(signal, willReturn); //(adjust state for track) if(!signal.force()){ if(isPrinting){ current.trackCountPending = PendingType.PRINTING; current.timesPrinted -= 1; }else{ current.trackCountPending = PendingType.SEEN; } current.timesSeen -= 1; } //(push stack) stack.push(current); current = new RepeatedRecordInfo(); if(!isPrinting){ current.suppressRecord = true; } return willReturn; }
/** {@inheritDoc} */ @Override public List<Record> signalStartTrack(Record signal) { //(handle record) List<Record> willReturn = new ArrayList<Record>(); boolean isPrinting = internalHandle(signal, willReturn); //(adjust state for track) if(!signal.force()){ if(isPrinting){ current.trackCountPending = PendingType.PRINTING; current.timesPrinted -= 1; }else{ current.trackCountPending = PendingType.SEEN; } current.timesSeen -= 1; } //(push stack) stack.push(current); current = new RepeatedRecordInfo(); if(!isPrinting){ current.suppressRecord = true; } return willReturn; }
private boolean recordVerdict(Record r, boolean isRepeat, boolean shouldPrint, List<Record> willReturn){ if(r.force()){ flushParents(willReturn); if(isRepeat){ flush(current,willReturn); } //if not repeat, will flush below shouldPrint = true; } if(!isRepeat) { flush(current,willReturn); current.lastRecord = r; } if(shouldPrint){ current.timeOfLastPrintedRecord = r.timesstamp; current.timesPrinted += 1; } current.timesSeen += 1; current.somethingPrinted = true; //(return) return shouldPrint; }
/** {@inheritDoc} */ @Override public List<Record> signalStartTrack(Record signal) { //(handle record) List<Record> willReturn = new ArrayList<>(); boolean isPrinting = internalHandle(signal, willReturn); //(adjust state for track) if(!signal.force()){ if(isPrinting){ current.trackCountPending = PendingType.PRINTING; current.timesPrinted -= 1; }else{ current.trackCountPending = PendingType.SEEN; } current.timesSeen -= 1; } //(push stack) stack.push(current); current = new RepeatedRecordInfo(); if(!isPrinting){ current.suppressRecord = true; } return willReturn; }
private boolean recordVerdict(Record r, boolean isRepeat, boolean shouldPrint, List<Record> willReturn){ if(r.force()){ flushParents(willReturn); if(isRepeat){ flush(current,willReturn); } //if not repeat, will flush below shouldPrint = true; } if(!isRepeat) { flush(current,willReturn); current.lastRecord = r; } if(shouldPrint){ current.timeOfLastPrintedRecord = r.timesstamp; current.timesPrinted += 1; } current.timesSeen += 1; current.somethingPrinted = true; //(return) return shouldPrint; }
/** {@inheritDoc} */ @Override public List<Record> signalStartTrack(Record signal) { //(queue track) this.queuedTracks.addLast(signal); //(push info) if(info != null){ this.trackStack.push(info); } info = new TrackInfo(signal.content.toString(), signal.timesstamp); //(force print) if(signal.force()){ updateTracks(signal.depth+1); } //(return) return EMPTY; //don't send extra records }
private boolean recordVerdict(Record r, boolean isRepeat, boolean shouldPrint, List<Record> willReturn){ if(r.force()){ flushParents(willReturn); if(isRepeat){ flush(current,willReturn); } //if not repeat, will flush below shouldPrint = true; } if(!isRepeat) { flush(current,willReturn); current.lastRecord = r; } if(shouldPrint){ current.timeOfLastPrintedRecord = r.timesstamp; current.timesPrinted += 1; } current.timesSeen += 1; current.somethingPrinted = true; //(return) return shouldPrint; }
/** {@inheritDoc} */ @Override public List<Record> signalStartTrack(Record signal) { //(queue track) this.queuedTracks.addLast(signal); //(push info) if(info != null){ this.trackStack.push(info); } info = new TrackInfo(signal.content.toString(), signal.timesstamp); //(force print) if(signal.force()){ updateTracks(signal.depth+1); } //(return) return EMPTY; //don't send extra records }
/** {@inheritDoc} */ @Override public List<Record> signalStartTrack(Record signal) { //(queue track) this.queuedTracks.addLast(signal); //(push info) if(info != null){ this.trackStack.push(info); } info = new TrackInfo(signal.content.toString(), signal.timesstamp); //(force print) if(signal.force()){ updateTracks(signal.depth+1); } //(return) return EMPTY; //don't send extra records }
private boolean recordVerdict(Record r, boolean isRepeat, boolean shouldPrint, List<Record> willReturn){ if(r.force()){ flushParents(willReturn); if(isRepeat){ flush(current,willReturn); } //if not repeat, will flush below shouldPrint = true; } if(!isRepeat) { flush(current,willReturn); current.lastRecord = r; } if(shouldPrint){ current.timeOfLastPrintedRecord = r.timesstamp; current.timesPrinted += 1; } current.timesSeen += 1; current.somethingPrinted = true; //(return) return shouldPrint; }