src/main/java/de/uapcore/lightpit/entities/IssueSummary.java

changeset 150
822b7e3d064d
parent 149
30b840ed8c0e
child 151
b3f14cd4f3ab
--- a/src/main/java/de/uapcore/lightpit/entities/IssueSummary.java	Fri Oct 23 18:40:50 2020 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-package de.uapcore.lightpit.entities;
-
-public class IssueSummary {
-    private int open = 0;
-    private int active = 0;
-    private int done = 0;
-
-    public int getOpen() {
-        return open;
-    }
-
-    public void setOpen(int open) {
-        this.open = open;
-    }
-
-    public int getActive() {
-        return active;
-    }
-
-    public void setActive(int active) {
-        this.active = active;
-    }
-
-    public int getDone() {
-        return done;
-    }
-
-    public void setDone(int done) {
-        this.done = done;
-    }
-
-    public int getTotal() {
-        return open+active+done;
-    }
-
-    public int getOpenPercent() {
-        return 100-getActivePercent()-getDonePercent();
-    }
-
-    public int getActivePercent() {
-        int total = getTotal();
-        return total > 0 ? Math.round(100.f*active/total) : 0;
-    }
-
-    public int getDonePercent() {
-        int total = getTotal();
-        return total > 0 ? Math.round(100.f*done/total) : 100;
-    }
-
-    /**
-     * Adds the specified issue to the summary by increming the respective counter.
-     * @param issue the issue
-     */
-    public void add(Issue issue) {
-        switch (issue.getStatus().getPhase()) {
-            case 0:
-                open++;
-                break;
-            case 1:
-                active++;
-                break;
-            case 2:
-                done++;
-                break;
-        }
-    }
-}

mercurial