@Override public void addDisplayEntity(DisplayEntity ent) { super.addDisplayEntity(ent); // Log the entity's outputs file.format("%n"); logTime = this.getSimTime(); ReportGenerator.printOutputs(file, ent, logTime); // Log the entity's states if (ent instanceof StateEntity) ReportGenerator.printStates(file, (StateEntity) ent); // Empty the output buffer file.flush(); // Send the entity to the next element in the chain this.sendToNextComponent(ent); }