lejos.nxt.addon
Enum DIMUAccel.AccelUnits

java.lang.Object
  extended by java.lang.Enum<DIMUAccel.AccelUnits>
      extended by lejos.nxt.addon.DIMUAccel.AccelUnits
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DIMUAccel.AccelUnits>
Enclosing class:
DIMUAccel

public static enum DIMUAccel.AccelUnits
extends java.lang.Enum<DIMUAccel.AccelUnits>

List of possible units for acceleration


Enum Constant Summary
G
          Acceleration in G
MILLIG
          Acceleration in milli-G
MILLIMS2
          Acceleration in mm/s^2
MS2
          Acceleration in m/s^2
 
Method Summary
 void convertTo(float[] values, DIMUAccel.AccelUnits unit)
          Converts an array of values in place to specified unit
 float convertTo(float value, DIMUAccel.AccelUnits unit)
          Converts a value to specified unit
static DIMUAccel.AccelUnits valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static DIMUAccel.AccelUnits[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

MILLIG

public static final DIMUAccel.AccelUnits MILLIG
Acceleration in milli-G


G

public static final DIMUAccel.AccelUnits G
Acceleration in G


MS2

public static final DIMUAccel.AccelUnits MS2
Acceleration in m/s^2


MILLIMS2

public static final DIMUAccel.AccelUnits MILLIMS2
Acceleration in mm/s^2

Method Detail

values

public static final DIMUAccel.AccelUnits[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(DIMUAccel.AccelUnits c : DIMUAccel.AccelUnits.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static DIMUAccel.AccelUnits valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

convertTo

public float convertTo(float value,
                       DIMUAccel.AccelUnits unit)
Converts a value to specified unit

Parameters:
value - Value to convert.
unit - Unit to convert to.
Returns:
Converted value.

convertTo

public void convertTo(float[] values,
                      DIMUAccel.AccelUnits unit)
Converts an array of values in place to specified unit

Parameters:
values - Array of values to convert.
unit - Unit to convert to.