Enum Class WindForce

java.lang.Object
java.lang.Enum<WindForce>
org.tquadrat.foundation.value.WindForce
All Implemented Interfaces:
Serializable, Comparable<WindForce>, Constable

@ClassVersion(sourceVersion="$Id: WindForce.java 1073 2023-10-01 11:08:51Z tquadrat $") @API(status=STABLE, since="0.0.4") public enum WindForce extends Enum<WindForce>
The wind force according to the Beaufort table.
Author:
Thomas Thrien (thomas.thrien@tquadrat.org)
Version:
$Id: WindForce.java 1073 2023-10-01 11:08:51Z tquadrat $
Since:
0.0.4
UML Diagram
UML Diagram for "org.tquadrat.foundation.value.WindForce"

UML Diagram for "org.tquadrat.foundation.value.WindForce"

UML Diagram for "org.tquadrat.foundation.value.WindForce"
  • Enum Constant Details

  • Field Details

  • Constructor Details

    • WindForce

      private WindForce(int number, String maxSpeed)
      Creates a new WindForce object.
      Parameters:
      number - The numerical wind force.
      maxSpeed - The maximum wind speed for this wind force in m/s.
  • Method Details

    • values

      public static WindForce[] 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 WindForce 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
    • determineWindForce

      public static WindForce determineWindForce(double speed)
      Returns the wind force for the given wind speed.
      Parameters:
      speed - The wind speed in m/s.
      Returns:
      The wind force.
    • determineWindForce

      public static WindForce determineWindForce(Speed unit, double speed)
      Returns the wind force for the given wind speed.
      Parameters:
      unit - The unit for the speed value.
      speed - The wind speed.
      Returns:
      The wind force.
    • determineWindForce

      public static WindForce determineWindForce(SpeedValue speed)
      Returns the wind force for the given wind speed.
      Parameters:
      speed - The wind speed.
      Returns:
      The wind force.
    • emptySet

      public static Set<WindForce> emptySet()
      Return an empty Set of WindForce instances.
      Returns:
      An empty set.
    • getMaxSpeed

      public final SpeedValue getMaxSpeed()
      Returns maximum wind speed for this wind force.
      Returns:
      The maximum speed.
    • getNumber

      public final int getNumber()
      Returns the wind force number.
      Returns:
      The number.
    • toString

      public final String toString()
      Overrides:
      toString in class Enum<WindForce>
    • toString

      public final String toString(Locale locale)
      Returns the String representation for this wind force for the given language.
      Parameters:
      locale - The locale.
      Returns:
      The String representation.