Enum Class ForceUnit

java.lang.Object
java.lang.Enum<ForceUnit>
com.irurueta.units.ForceUnit
All Implemented Interfaces:
Serializable, Comparable<ForceUnit>, Constable

public enum ForceUnit extends Enum<ForceUnit>
Enumerator containing recognized typical force units.
  • Enum Constant Details

    • NEWTON

      public static final ForceUnit NEWTON
      Newton (N).
    • KILONEWTON

      public static final ForceUnit KILONEWTON
      Kilonewton (kN).
    • POUND_FORCE

      public static final ForceUnit POUND_FORCE
      Pound-force (lbf).
    • DYNE

      public static final ForceUnit DYNE
      Dyne (dyn).
    • KILOGRAM_FORCE

      public static final ForceUnit KILOGRAM_FORCE
      Kilogram-force (kgf).
  • Constructor Details

    • ForceUnit

      private ForceUnit()
  • Method Details

    • values

      public static ForceUnit[] 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 ForceUnit 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
    • getUnitSystem

      public static UnitSystem getUnitSystem(ForceUnit unit)
      Returns unit system for provided force unit.
      Parameters:
      unit - force unit to be checked.
      Returns:
      unit system (metric or imperial).
      Throws:
      IllegalArgumentException - if unit is null or not supported.
    • getMetricUnits

      public static ForceUnit[] getMetricUnits()
      Gets all supported metric force units.
      Returns:
      all supported metric force units.
    • getImperialUnits

      public static ForceUnit[] getImperialUnits()
      Gets all supported imperial force units.
      Returns:
      all supported imperial force units.
    • isMetric

      public static boolean isMetric(ForceUnit unit)
      Indicates whether provided unit belongs to the metric unit system.
      Parameters:
      unit - force unit to be checked.
      Returns:
      true if unit belongs to metric unit system.
      Throws:
      IllegalArgumentException - if unit is null or not supported.
    • isImperial

      public static boolean isImperial(ForceUnit unit)
      Indicates whether provided unit belongs to the imperial unit system.
      Parameters:
      unit - force unit to be checked.
      Returns:
      true if unit belongs to imperial unit system.
      Throws:
      IllegalArgumentException - if unit is null or not supported.