Class WeatherCodeContract


  • public final class WeatherCodeContract
    extends java.lang.Object
    • Field Detail

      • SLIGHT_OR_MODERATE_THUNDERSTORM_WITH_RAIN_OR_SNOW

        public static final int SLIGHT_OR_MODERATE_THUNDERSTORM_WITH_RAIN_OR_SNOW
        See Also:
        Constant Field Values
      • DRIZZLE_FREEZING_MODERATE_OR_HEAVY

        public static final int DRIZZLE_FREEZING_MODERATE_OR_HEAVY
        See Also:
        Constant Field Values
      • DRIZZLE_FREEZING_SLIGHT

        public static final int DRIZZLE_FREEZING_SLIGHT
        See Also:
        Constant Field Values
      • RAIN_FREEZING_MODERATE_OR_HEAVY

        public static final int RAIN_FREEZING_MODERATE_OR_HEAVY
        See Also:
        Constant Field Values
      • SNOW_SHOWERS_MODERATE_OR_HEAVY

        public static final int SNOW_SHOWERS_MODERATE_OR_HEAVY
        See Also:
        Constant Field Values
      • SHOWERS_OF_RAIN_AND_SNOW_MIXED_MODERATE_OR_HEAVY

        public static final int SHOWERS_OF_RAIN_AND_SNOW_MIXED_MODERATE_OR_HEAVY
        See Also:
        Constant Field Values
      • SHOWERS_OF_RAIN_AND_SNOW_MIXED_SLIGHT

        public static final int SHOWERS_OF_RAIN_AND_SNOW_MIXED_SLIGHT
        See Also:
        Constant Field Values
      • EXTREMELY_HEAVY_RAIN_SHOWER

        public static final int EXTREMELY_HEAVY_RAIN_SHOWER
        See Also:
        Constant Field Values
      • MODERATE_OR_HEAVY_RAIN_SHOWERS

        public static final int MODERATE_OR_HEAVY_RAIN_SHOWERS
        See Also:
        Constant Field Values
      • HEAVY_SNOWFALL_CONTINUOUS

        public static final int HEAVY_SNOWFALL_CONTINUOUS
        See Also:
        Constant Field Values
      • MODERATE_SNOWFALL_CONTINUOUS

        public static final int MODERATE_SNOWFALL_CONTINUOUS
        See Also:
        Constant Field Values
      • SLIGHT_SNOWFALL_CONTINUOUS

        public static final int SLIGHT_SNOWFALL_CONTINUOUS
        See Also:
        Constant Field Values
      • MODERATE_OR_HEAVY_RAIN_AND_SNOW

        public static final int MODERATE_OR_HEAVY_RAIN_AND_SNOW
        See Also:
        Constant Field Values
      • HEAVY_DRIZZLE_NOT_FREEZING_CONTINUOUS

        public static final int HEAVY_DRIZZLE_NOT_FREEZING_CONTINUOUS
        See Also:
        Constant Field Values
      • MODERATE_DRIZZLE_NOT_FREEZING_CONTINUOUS

        public static final int MODERATE_DRIZZLE_NOT_FREEZING_CONTINUOUS
        See Also:
        Constant Field Values
      • SLIGHT_DRIZZLE_NOT_FREEZING_CONTINUOUS

        public static final int SLIGHT_DRIZZLE_NOT_FREEZING_CONTINUOUS
        See Also:
        Constant Field Values
      • HEAVY_RAIN_NOT_FREEZING_CONTINUOUS

        public static final int HEAVY_RAIN_NOT_FREEZING_CONTINUOUS
        See Also:
        Constant Field Values
      • MODERATE_RAIN_NOT_FREEZING_CONTINUOUS

        public static final int MODERATE_RAIN_NOT_FREEZING_CONTINUOUS
        See Also:
        Constant Field Values
      • SLIGHT_RAIN_NOT_FREEZING_CONTINUOUS

        public static final int SLIGHT_RAIN_NOT_FREEZING_CONTINUOUS
        See Also:
        Constant Field Values
      • ICE_FOG_SKY_NOT_RECOGNIZABLE

        public static final int ICE_FOG_SKY_NOT_RECOGNIZABLE
        See Also:
        Constant Field Values
      • FOG_SKY_NOT_RECOGNIZABLE

        public static final int FOG_SKY_NOT_RECOGNIZABLE
        See Also:
        Constant Field Values
      • EFFECTIVE_CLOUD_COVER_AT_LEAST_7_8

        public static final int EFFECTIVE_CLOUD_COVER_AT_LEAST_7_8
        See Also:
        Constant Field Values
      • EFFECTIVE_CLOUD_COVER_BETWEEN_46_8_AND_6_8

        public static final int EFFECTIVE_CLOUD_COVER_BETWEEN_46_8_AND_6_8
        See Also:
        Constant Field Values
      • EFFECTIVE_CLOUD_COVER_BETWEEN_1_8_AND_45_8

        public static final int EFFECTIVE_CLOUD_COVER_BETWEEN_1_8_AND_45_8
        See Also:
        Constant Field Values
      • EFFECTIVE_CLOUD_COVER_LESS_THAN_1_8

        public static final int EFFECTIVE_CLOUD_COVER_LESS_THAN_1_8
        See Also:
        Constant Field Values
      • CodePriorityList

        public static final int[] CodePriorityList
      • CodePriorities

        public static final java.util.Map<java.lang.Integer,​java.lang.Integer> CodePriorities
    • Constructor Detail

      • WeatherCodeContract

        public WeatherCodeContract()
    • Method Detail

      • translateToOpenWeatherCode

        public static int translateToOpenWeatherCode​(int code)
      • getWeatherConditionText

        public static java.lang.String getWeatherConditionText​(Context context,
                                                               int weathercondition)
      • getWeatherConditionTextResource

        public static int getWeatherConditionTextResource​(int weathercondition)
      • getCodePriority

        public static int getCodePriority​(int conditionCode)
      • hasHigherPriority

        public static boolean hasHigherPriority​(int codeA,
                                                int codeB)
      • hasSufficientDataForIconCalculation

        public static boolean hasSufficientDataForIconCalculation​(Weather.WeatherInfo weatherInfo)
      • calculateCustomWeatherconditionFromData

        public static int calculateCustomWeatherconditionFromData​(Weather.WeatherInfo weatherInfo)