@Override
    public boolean equals(Object o) {
        if (!(o instanceof Duration)) {
            return false;
        }

        if (o == this) {
            return true;
        }

        Duration d = (Duration) o;

        if (d.getDurationValue() != this.getDurationValue()) {
            return false;
        }

        if (d.getValue() == this.value && d.getDots() == this.dots){
            return true;
        }

        return false;
    }