protected double convertTo(Unit otherUnit){
        if(!otherUnit.getClass().isInstance(this.unit)) {
            throw new RuntimeException("You can't convert " + this.unit + " to " + otherUnit);
        }
        if(this.unit == otherUnit) {
            return this.value;
        }
        return unit.convertTo(this.value, otherUnit);
    }