// Path: app/src/main/java/cat/ppicas/cleanarch/text/NumberFormat.java
// public final class NumberFormat {
// 
//     private static final java.text.NumberFormat DECIMAL_FORMATTER
//             = java.text.NumberFormat.getInstance();
// 
//     static {
//         DECIMAL_FORMATTER.setMaximumFractionDigits(2);
//     }
// 
//     private NumberFormat() {
//         throw new RuntimeException("Instances are not allowed for this class");
//     }
// 
//     public static String formatDecimal(double num) {
//         return DECIMAL_FORMATTER.format(num);
//     }
// 
//     public static String formatTemperature(double temp) {
//         return DECIMAL_FORMATTER.format(temp) + "º";
//     }
// 
//     public static String formatHumidity(double humidity) {
//         return Math.round(humidity) + "%";
//     }
// 
//     public static String formatWindSpeed(double windSpeed) {
//         return DECIMAL_FORMATTER.format(windSpeed) + " m/s";
//     }
// 
//     public static String formatElevation(int elevation) {
//         return elevation + "m";
//     }
// }
// 
// Path: app/src/main/java/cat/ppicas/cleanarch/ui/vista/CityListItemVista.java
// public interface CityListItemVista extends Vista {
// 
//     void setCityName(String name);
// 
//     void setCountry(String country);
// 
//     void setCurrentTemp(String temp);
// 
//     void setLoadingElevation(boolean loading);
// 
//     void setElevation(int elevation);
// 
// }


import android.content.Context;
import android.util.AttributeSet;
import android.widget.LinearLayout;
import android.widget.TextView;
import cat.ppicas.cleanarch.R;
import cat.ppicas.cleanarch.text.NumberFormat;
import cat.ppicas.cleanarch.ui.vista.CityListItemVista;
        mTempView = (TextView) findViewById(R.id.city_list_item__temp);
        mElevationView = (TextView) findViewById(R.id.city_list_item__elevation);
    }

    @Override
    public void setCityName(String name) {
        mName = name;
        updateNameView();
    }

    @Override
    public void setCountry(String country) {
        mCountry = country;
        updateNameView();
    }

    @Override
    public void setCurrentTemp(String temp) {
        mTempView.setText(temp);
    }

    @Override
    public void setLoadingElevation(boolean loading) {
        if (loading) {
            mElevationView.setText(getContext().getString(R.string.city_list_item__elevation));
        }
    }

    @Override
    public void setElevation(int elevation) {
// Path: app/src/main/java/cat/ppicas/cleanarch/text/NumberFormat.java
// public final class NumberFormat {
// 
//     private static final java.text.NumberFormat DECIMAL_FORMATTER
//             = java.text.NumberFormat.getInstance();
// 
//     static {
//         DECIMAL_FORMATTER.setMaximumFractionDigits(2);
//     }
// 
//     private NumberFormat() {
//         throw new RuntimeException("Instances are not allowed for this class");
//     }
// 
//     public static String formatDecimal(double num) {
//         return DECIMAL_FORMATTER.format(num);
//     }
// 
//     public static String formatTemperature(double temp) {
//         return DECIMAL_FORMATTER.format(temp) + "º";
//     }
// 
//     public static String formatHumidity(double humidity) {
//         return Math.round(humidity) + "%";
//     }
// 
//     public static String formatWindSpeed(double windSpeed) {
//         return DECIMAL_FORMATTER.format(windSpeed) + " m/s";
//     }
// 
//     public static String formatElevation(int elevation) {
//         return elevation + "m";
//     }
// }
// 
// Path: app/src/main/java/cat/ppicas/cleanarch/ui/vista/CityListItemVista.java
// public interface CityListItemVista extends Vista {
// 
//     void setCityName(String name);
// 
//     void setCountry(String country);
// 
//     void setCurrentTemp(String temp);
// 
//     void setLoadingElevation(boolean loading);
// 
//     void setElevation(int elevation);
// 
// }


// Path: app/src/main/java/cat/ppicas/cleanarch/ui/view/CityListItemView.java
import android.content.Context;
import android.util.AttributeSet;
import android.widget.LinearLayout;
import android.widget.TextView;
import cat.ppicas.cleanarch.R;
import cat.ppicas.cleanarch.text.NumberFormat;
import cat.ppicas.cleanarch.ui.vista.CityListItemVista;

        mTempView = (TextView) findViewById(R.id.city_list_item__temp);
        mElevationView = (TextView) findViewById(R.id.city_list_item__elevation);
    }

    @Override
    public void setCityName(String name) {
        mName = name;
        updateNameView();
    }

    @Override
    public void setCountry(String country) {
        mCountry = country;
        updateNameView();
    }

    @Override
    public void setCurrentTemp(String temp) {
        mTempView.setText(temp);
    }

    @Override
    public void setLoadingElevation(boolean loading) {
        if (loading) {
            mElevationView.setText(getContext().getString(R.string.city_list_item__elevation));
        }
    }

    @Override
    public void setElevation(int elevation) {
        mElevationView.setText(NumberFormat.formatElevation(elevation));