public enum

SpeedUnit

extends Enum<E extends Enum<E>>
java.lang.Object
   ↳ java.lang.Enum<E extends java.lang.Enum<E>>
     ↳ com.commsignia.v2x.utils.units.SpeedUnit

Class Overview

Utility class for specifying speed units.

Summary

Enum Values
SpeedUnit  CMperS  Specified in centimeters per second. 
SpeedUnit  KMperH  Specified in kilometers in second. 
SpeedUnit  MperS  Specified in meters per second. 
Public Methods
abstract double convert(double d, SpeedUnit u)
Convert the given speed in the given unit to this unit.
static SpeedUnit valueOf(String name)
final static SpeedUnit[] values()
Protected Methods
abstract double toCentimetersPerSecond(double d)
abstract double toKilometersPerHour(double d)
abstract double toMetersPerSecond(double d)
[Expand]
Inherited Methods
From class java.lang.Enum
From class java.lang.Object
From interface java.lang.Comparable

Enum Values

public static final SpeedUnit CMperS

Specified in centimeters per second.

public static final SpeedUnit KMperH

Specified in kilometers in second.

public static final SpeedUnit MperS

Specified in meters per second.

Public Methods

public abstract double convert (double d, SpeedUnit u)

Convert the given speed in the given unit to this unit.

Parameters
d speed value
u speed unit
Returns
  • speed value in this unit

public static SpeedUnit valueOf (String name)

public static final SpeedUnit[] values ()

Protected Methods

protected abstract double toCentimetersPerSecond (double d)

protected abstract double toKilometersPerHour (double d)

protected abstract double toMetersPerSecond (double d)