1 package compbio.stat.servlet;
\r
3 import java.util.Map;
\r
5 import compbio.stat.collector.StatProcessor;
\r
6 import compbio.ws.client.Services;
\r
8 public class Totals {
\r
15 public int getTotal() {
\r
19 public int getIncomplete() {
\r
23 public int getAbandoned() {
\r
27 public int getCancelled() {
\r
31 public int getFailed() {
\r
35 static Totals sumStats(Map<Services, StatProcessor> stat) {
\r
36 Totals total = new Totals();
\r
37 for (Map.Entry<Services, StatProcessor> serv : stat.entrySet()) {
\r
38 total.total += serv.getValue().getJobNumber();
\r
39 total.incomplete += serv.getValue().getIncompleteJobs().size();
\r
40 total.abandoned += serv.getValue().getAbandonedJobs().size();
\r
41 total.cancelled += serv.getValue().getCancelledJobs().size();
\r
42 total.failed += serv.getValue().getFailedJobs().size();
\r