Package com.irurueta.units
Enum Class AccelerationUnit
- All Implemented Interfaces:
Serializable,Comparable<AccelerationUnit>,Constable
Enumerator containing recognized typical acceleration units.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFeet per squared second (ft/s^2).Relative to gravitational acceleration (9.81 m/s^2).Meters per squared second (m/s^2). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AccelerationUnit[]Gets all supported imperial acceleration units.static AccelerationUnit[]Gets all supported metric acceleration units.static UnitSystemReturns unit system for provided acceleration unit.static booleanisImperial(AccelerationUnit unit) Indicates whether provided unit belongs to the imperial unit system.static booleanisMetric(AccelerationUnit unit) Indicates whether provided unit belongs to the metric unit system.static AccelerationUnitReturns the enum constant of this class with the specified name.static AccelerationUnit[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
METERS_PER_SQUARED_SECOND
Meters per squared second (m/s^2). -
G
Relative to gravitational acceleration (9.81 m/s^2). -
FEET_PER_SQUARED_SECOND
Feet per squared second (ft/s^2).
-
-
Constructor Details
-
AccelerationUnit
private AccelerationUnit()
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getUnitSystem
Returns unit system for provided acceleration unit.- Parameters:
unit- acceleration unit to be checked.- Returns:
- unit system (metric or imperial).
- Throws:
IllegalArgumentException- if unit is null or not supported.
-
getMetricUnits
Gets all supported metric acceleration units.- Returns:
- all supported metric acceleration units.
-
getImperialUnits
Gets all supported imperial acceleration units.- Returns:
- all supported imperial acceleration units.
-
isMetric
Indicates whether provided unit belongs to the metric unit system.- Parameters:
unit- acceleration unit to be checked.- Returns:
- true if unit belongs to metric unit system.
- Throws:
IllegalArgumentException- if unit is null or not supported.
-
isImperial
Indicates whether provided unit belongs to the imperial unit system.- Parameters:
unit- acceleration unit to be checked.- Returns:
- true if unit belongs to imperial unit system.
- Throws:
IllegalArgumentException- if unit is null or not supported.
-