@Override public void buildEnd() { int ca = reportData.getValueFor(TransportMode.CAR); int bi = reportData.getValueFor(TransportMode.BICYCLE); int pu = reportData.getValueFor(TransportMode.PUBLIC_TRANSPORTATION); int tr = reportData.getValueFor(TransportMode.TRAVELLING); int ho = reportData.getValueFor(TransportMode.HOME); int no = reportData.getValueFor(TransportMode.NON_WORKING_DAYS); int un = reportData.getValueFor(TransportMode.UNKNOWN); StringBuilder report = new StringBuilder(); report.append("-------------------------------------------------------------------------\n"); report.append( String.format( "| Car: %3d Bicycle: %3d Public: %3d Traveling: %3d |\n", ca, bi, pu, tr)); report.append( String.format( "| Home: %3d NonWDays: %3d Unknown: %3d |\n", ho, no, un)); report.append("-------------------------------------------------------------------------\n"); reportData.setResult(report.toString()); }