// Path: app/src/main/java/com/waynedgrant/cirrus/units/WindSpeedUnit.java
// public enum WindSpeedUnit {
//     BEAUFORT_SCALE("Beaufort Scale (Bft)"),
//     KILOMETRES_PER_HOUR("Kilometres per Hour (km/h)"),
//     KNOTS("Knots (kts)"),
//     METRES_PER_SECOND("Metres per Second (m/s)"),
//     MILES_PER_HOUR("Miles per Hour (mph)");
// 
//     private String description;
// 
//     WindSpeedUnit(String description) {
//         this.description = description;
//     }
// 
//     public String toString() {
//         return description;
//     }
// }


import java.math.RoundingMode;
import com.waynedgrant.cirrus.units.WindSpeedUnit;
import java.math.BigDecimal;

/* Copyright 2017 Wayne D Grant (www.waynedgrant.com)
   Licensed under the MIT License */

package com.waynedgrant.cirrus.measures;



public class WindSpeed {
    private BigDecimal knots;
    private BigDecimal metresPerSecond;
    private BigDecimal kilometresPerHour;
    private BigDecimal milesPerHour;
    private BigDecimal beaufortScale;

    public WindSpeed(BigDecimal knots) {
        this.knots = knots;
        this.metresPerSecond = knots.multiply(new BigDecimal("0.514444"));
        this.kilometresPerHour = knots.multiply(new BigDecimal("1.852"));
        this.milesPerHour = knots.multiply(new BigDecimal("1.15078"));
        this.beaufortScale = convertKnotsToBeaufortScale(knots);
    }


// Path: app/src/main/java/com/waynedgrant/cirrus/units/WindSpeedUnit.java
// public enum WindSpeedUnit {
//     BEAUFORT_SCALE("Beaufort Scale (Bft)"),
//     KILOMETRES_PER_HOUR("Kilometres per Hour (km/h)"),
//     KNOTS("Knots (kts)"),
//     METRES_PER_SECOND("Metres per Second (m/s)"),
//     MILES_PER_HOUR("Miles per Hour (mph)");
// 
//     private String description;
// 
//     WindSpeedUnit(String description) {
//         this.description = description;
//     }
// 
//     public String toString() {
//         return description;
//     }
// }


// Path: app/src/main/java/com/waynedgrant/cirrus/measures/WindSpeed.java
import java.math.RoundingMode;
import com.waynedgrant.cirrus.units.WindSpeedUnit;
import java.math.BigDecimal;

/* Copyright 2017 Wayne D Grant (www.waynedgrant.com)
   Licensed under the MIT License */

package com.waynedgrant.cirrus.measures;



public class WindSpeed {
    private BigDecimal knots;
    private BigDecimal metresPerSecond;
    private BigDecimal kilometresPerHour;
    private BigDecimal milesPerHour;
    private BigDecimal beaufortScale;

    public WindSpeed(BigDecimal knots) {
        this.knots = knots;
        this.metresPerSecond = knots.multiply(new BigDecimal("0.514444"));
        this.kilometresPerHour = knots.multiply(new BigDecimal("1.852"));
        this.milesPerHour = knots.multiply(new BigDecimal("1.15078"));
        this.beaufortScale = convertKnotsToBeaufortScale(knots);
    }


    public BigDecimal getValue(WindSpeedUnit unit) {
