Enum Class StormType

java.lang.Object
java.lang.Enum<StormType>
net.nullved.pmweatherapi.util.StormType
All Implemented Interfaces:
Serializable, Comparable<StormType>, Constable

public enum StormType extends Enum<StormType>
An enum holding different storm types
Since:
0.15.0.0
  • Enum Constant Details

    • SUPERCELL

      public static final StormType SUPERCELL
    • TORNADO

      public static final StormType TORNADO
    • SQUALL

      public static final StormType SQUALL
    • CYCLONE

      public static final StormType CYCLONE
  • Field Details

    • idx

      public final int idx
    • stage

      public final int stage
  • Method Details

    • values

      public static StormType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static StormType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • idx

      public int idx()
      Gets the index of the StormType
      Returns:
      The StormType index
      Since:
      0.15.0.0
    • stage

      public int stage()
      Gets the minimum stage of the StormType
      Returns:
      The minimum stage of the StormType
      Since:
      0.15.0.0
    • matches

      public boolean matches(dev.protomanly.pmweather.weather.Storm storm)
      Determines if the Storm meets this StormType's specification. If this StormType defines a `stage` (such as TORNADO), the Storm must be equal to or above that stage
      Parameters:
      storm - The Storm to check
      Returns:
      true if this Storm meets the StormType specification
      Since:
      0.15.0.0