Commit 05c1df03 authored by Falko Schumann's avatar Falko Schumann 💩
Browse files

Statischen Konstruktor ergänzt, der `null` erlaubt

parent c39dd2d2
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -52,6 +52,14 @@ public final class Zugehoerigkeit implements Comparable<Zugehoerigkeit> {
        return new Zugehoerigkeit(wert);
    }

    public static Zugehoerigkeit vonNullwert(Double wert) {
        if (wert == null) {
            return NULL;
        } else {
            return von(wert);
        }
    }

    public double getWert() {
        return wert / 1000.0;
    }