// Path: app/src/main/java/com/waynedgrant/cirrus/measures/Rainfall.java
// public class Rainfall {
//     private BigDecimal millimetres;
//     private BigDecimal inches;
// 
//     public Rainfall(BigDecimal millimetres) {
//         this.millimetres = millimetres;
//         this.inches = this.millimetres.multiply(new BigDecimal("1").divide(new BigDecimal("25.4"), DECIMAL32));
//     }
// 
//     public BigDecimal getValue(RainfallUnit unit) {
//         BigDecimal value = null;
// 
//         switch (unit) {
//             case MILLIMETRES:
//                 value = millimetres;
//                 break;
//             case INCHES:
//                 value = inches;
//                 break;
//         }
// 
//         return value;
//     }
// }
// 
// Path: app/src/main/java/com/waynedgrant/cirrus/units/RainfallUnit.java
// public enum RainfallUnit {
//     INCHES("Inches (in)"),
//     MILLIMETRES("Millimetres (mm)");
// 
//     private String description;
// 
//     RainfallUnit(String description) {
//         this.description = description;
//     }
// 
//     public String toString() {
//         return description;
//     }
// }


import com.waynedgrant.cirrus.measures.Rainfall;
import com.waynedgrant.cirrus.units.RainfallUnit;
import java.math.RoundingMode;
import java.util.Locale;
import static com.waynedgrant.cirrus.units.RainfallUnit.MILLIMETRES;
/* Copyright 2017 Wayne D Grant (www.waynedgrant.com)
   Licensed under the MIT License */

package com.waynedgrant.cirrus.presentation.formatters;




public class RainfallFormatter {
    private Rainfall rainfall;

    public RainfallFormatter(Rainfall rainfall) {
        this.rainfall = rainfall;
    }

    public String format(RainfallUnit unit) {
        String formatted;

// Path: app/src/main/java/com/waynedgrant/cirrus/measures/Rainfall.java
// public class Rainfall {
//     private BigDecimal millimetres;
//     private BigDecimal inches;
// 
//     public Rainfall(BigDecimal millimetres) {
//         this.millimetres = millimetres;
//         this.inches = this.millimetres.multiply(new BigDecimal("1").divide(new BigDecimal("25.4"), DECIMAL32));
//     }
// 
//     public BigDecimal getValue(RainfallUnit unit) {
//         BigDecimal value = null;
// 
//         switch (unit) {
//             case MILLIMETRES:
//                 value = millimetres;
//                 break;
//             case INCHES:
//                 value = inches;
//                 break;
//         }
// 
//         return value;
//     }
// }
// 
// Path: app/src/main/java/com/waynedgrant/cirrus/units/RainfallUnit.java
// public enum RainfallUnit {
//     INCHES("Inches (in)"),
//     MILLIMETRES("Millimetres (mm)");
// 
//     private String description;
// 
//     RainfallUnit(String description) {
//         this.description = description;
//     }
// 
//     public String toString() {
//         return description;
//     }
// }


// Path: app/src/main/java/com/waynedgrant/cirrus/presentation/formatters/RainfallFormatter.java
import com.waynedgrant.cirrus.measures.Rainfall;
import com.waynedgrant.cirrus.units.RainfallUnit;
import java.math.RoundingMode;
import java.util.Locale;
import static com.waynedgrant.cirrus.units.RainfallUnit.MILLIMETRES;

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

package com.waynedgrant.cirrus.presentation.formatters;




public class RainfallFormatter {
    private Rainfall rainfall;

    public RainfallFormatter(Rainfall rainfall) {
        this.rainfall = rainfall;
    }

    public String format(RainfallUnit unit) {
        String formatted;

        if (rainfall != null) {