// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.olio.phone_state; import android.util.ArrayMap; import java.util.HashMap; import org.apache.commons.lang3.builder.EqualsBuilder; public class SimpleWeatherData { private static final String CLEAR_DAY = "clear-day"; private static final String CLEAR_NIGHT = "clear-night"; private static final String CLOUDY = "cloudy"; private static final String CLOUDY_NIGHT = "cloudy-night"; private static final String FOG = "fog"; private static final String LIGHTNING = "lightning"; private static final String PARTLY_CLOUDY_DAY = "partly-cloudy-day"; private static final String PARTLY_CLOUDY_NIGHT = "partly-cloudy-night"; private static final String RAIN = "rain"; private static final String SLEET = "sleet"; private static final String SNOW = "snow"; private static final String WEATHER_DISCONNECTED = "weather-disconnected"; private static final String WIND = "wind"; private static HashMap mWeatherIconMap; private static final ArrayMap sWorstinessOrder; private int mTemperature; private String mWeatherIcon; public SimpleWeatherData() { mWeatherIcon = "weather-disconnected"; } public static String worst(String s, String s1) { if (((Integer)sWorstinessOrder.get(s)).intValue() < ((Integer)sWorstinessOrder.get(s1)).intValue()) { return s; } else { return s1; } } public boolean equals(Object obj) { if (obj != null) { if (obj == this) { return true; } if (obj.getClass() == getClass()) { obj = (SimpleWeatherData)obj; return (new EqualsBuilder()).append(mTemperature, ((SimpleWeatherData) (obj)).getTemperature()).append(mWeatherIcon, ((SimpleWeatherData) (obj)).getWeatherIcon()).isEquals(); } } return false; } public String getIconOff() { return ((String[])mWeatherIconMap.get(mWeatherIcon))[1]; } public String getIconOn() { return ((String[])mWeatherIconMap.get(mWeatherIcon))[0]; } public int getTemperature() { return mTemperature; } public String getWeatherIcon() { if (mWeatherIcon == null || mWeatherIcon.equals("") || !mWeatherIconMap.containsKey(mWeatherIcon)) { return "weather-disconnected"; } else { return mWeatherIcon; } } public void setTemperature(int i) { mTemperature = i; } public void setWeatherIcon(String s) { if (mWeatherIconMap.containsKey(s)) { mWeatherIcon = s; return; } else { mWeatherIcon = "weather-disconnected"; return; } } static { mWeatherIconMap = new HashMap(); sWorstinessOrder = new ArrayMap(); mWeatherIconMap.put("weather-disconnected", new String[] { "weather_icon_disconnected_on.png", "weather_icon_disconnected_off.png" }); mWeatherIconMap.put("clear-day", new String[] { "weather_icon_sun_on.png", "weather_icon_sun_off.png" }); mWeatherIconMap.put("clear-night", new String[] { "weather_icon_moon_on.png", "weather_icon_moon_off.png" }); mWeatherIconMap.put("rain", new String[] { "weather_icon_rain_on.png", "weather_icon_rain_off.png" }); mWeatherIconMap.put("lightning", new String[] { "weather_icon_lightning_on.png", "weather_icon_lightning_off.png" }); mWeatherIconMap.put("snow", new String[] { "weather_icon_snow_on.png", "weather_icon_snow_off.png" }); mWeatherIconMap.put("sleet", new String[] { "weather_icon_sleet_on.png", "weather_icon_sleet_off.png" }); mWeatherIconMap.put("wind", new String[] { "weather_icon_wind_on.png", "weather_icon_wind_off.png" }); mWeatherIconMap.put("fog", new String[] { "weather_icon_fog_on.png", "weather_icon_fog_off.png" }); mWeatherIconMap.put("cloudy", new String[] { "weather_icon_cloud_on.png", "weather_icon_cloud_off.png" }); mWeatherIconMap.put("cloudy-night", new String[] { "weather_icon_cloud_on.png", "weather_icon_cloud_off.png" }); mWeatherIconMap.put("partly-cloudy-day", new String[] { "weather_icon_sun_cloud_on.png", "weather_icon_sun_cloud_off.png" }); mWeatherIconMap.put("partly-cloudy-night", new String[] { "weather_icon_moon_cloud_on.png", "weather_icon_moon_cloud_off.png" }); sWorstinessOrder.put("weather-disconnected", Integer.valueOf(0)); sWorstinessOrder.put("snow", Integer.valueOf(1)); sWorstinessOrder.put("sleet", Integer.valueOf(1)); sWorstinessOrder.put("rain", Integer.valueOf(2)); sWorstinessOrder.put("lightning", Integer.valueOf(2)); sWorstinessOrder.put("fog", Integer.valueOf(2)); sWorstinessOrder.put("wind", Integer.valueOf(3)); sWorstinessOrder.put("cloudy", Integer.valueOf(4)); sWorstinessOrder.put("cloudy-night", Integer.valueOf(4)); sWorstinessOrder.put("partly-cloudy-day", Integer.valueOf(5)); sWorstinessOrder.put("partly-cloudy-night", Integer.valueOf(5)); sWorstinessOrder.put("clear-day", Integer.valueOf(6)); sWorstinessOrder.put("clear-night", Integer.valueOf(6)); sWorstinessOrder.put("", Integer.valueOf(0x7fffffff)); } }