Skip to content

Commit

Permalink
Integration "nicht beendet" ("n.b.")
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisfabri committed Dec 28, 2023
1 parent c5596d0 commit f875935
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class Strafe implements Serializable {
public static final Strafe NICHT_BEENDET = new Strafe("Nicht beendet", "n.b.", Strafarten.DISQUALIFIKATION, 0);
public static final Strafe DISQUALIFIKATION = new Strafe("", "", Strafarten.DISQUALIFIKATION, 0);
public static final Strafe AUSSCHLUSS = new Strafe("", "", Strafarten.AUSSCHLUSS, 0);
public static final Strafe WITHDRAW = new Strafe("", "WD", Strafarten.NICHTS, 0);
public static final Strafe WITHDRAW = new Strafe("Withdraw", "WD", Strafarten.NICHTS, 0);

@XStreamAsAttribute
private String name = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ public final class Strafen implements Serializable {

private static final long serialVersionUID = 1664311476306024507L;

private static final String[] dnsNames = new String[] { "DNS", "D.N.S.", "n.a." };
private static final String[] dnfNames = new String[] { "DNF", "D.N.F.", "n.b.", "S1" };
private static final String[] wdNames = new String[] { "WD", "Withdraw" };

private LinkedList<StrafenKapitel> strafen;

/** Creates new Strafen */
Expand Down Expand Up @@ -76,13 +80,6 @@ public int compare(Strafe o1, Strafe o2) {
return ps;
}

private static final String[] dnsNames = new String[] { "DNS", "D.N.S.", "n.a." };
private static final String[] dnfNames = new String[] { "DNF", "D.N.F.", "S1" };
private static final String[] wdNames = new String[] { "WD", "Withdraw" };

private static final Strafe DIDNOTFINISH = new Strafe("Did not finish", "DNF", Strafarten.DISQUALIFIKATION, 0);
private static final Strafe WITHDRAW = new Strafe("Withdraw", "WD", Strafarten.NICHTS, 0);

public Strafe getNichtAngetreten() {
for (String na : dnsNames) {
Strafe s = getStrafe(na);
Expand All @@ -108,7 +105,7 @@ public Strafe getDidNotFinish() {
return s;
}
}
return DIDNOTFINISH;
return Strafe.NICHT_BEENDET;
}

public Strafe getWithdraw() {
Expand All @@ -118,6 +115,6 @@ public Strafe getWithdraw() {
return s;
}
}
return WITHDRAW;
return Strafe.WITHDRAW;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public String updated(String oldValue, String newValue) {
case "w":
setWithdraw();
break;
case "f":
case "f", "b":
if (oldValue.isEmpty()) {
setDidNotFinish();
}
Expand Down

0 comments on commit f875935

Please sign in to comment.