jhomenet.hw
Enum HardwareData.Unit

java.lang.Object
  extended by java.lang.Enum<HardwareData.Unit>
      extended by jhomenet.hw.HardwareData.Unit
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<HardwareData.Unit>
Enclosing class:
HardwareData

public static enum HardwareData.Unit
extends java.lang.Enum<HardwareData.Unit>

Define the available data value units.


Enum Constant Summary
C
           
cm
           
F
           
ft
           
in
           
kph
           
m
           
mm
           
mph
           
mps
           
ms
           
none
           
s
           
spms
           
tu
           
windDirection
           
 
Method Summary
 float convert(float value, HardwareData.Unit desiredUnit)
           
static float convert(float value, HardwareData.Unit currentUnit, HardwareData.Unit desiredUnit)
           
 java.lang.String getDescription()
           
 java.lang.String getStringRep()
           
static HardwareData.Unit valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static HardwareData.Unit[] 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

cm

public static final HardwareData.Unit cm

mm

public static final HardwareData.Unit mm

in

public static final HardwareData.Unit in

ft

public static final HardwareData.Unit ft

ms

public static final HardwareData.Unit ms

s

public static final HardwareData.Unit s

m

public static final HardwareData.Unit m

mps

public static final HardwareData.Unit mps

mph

public static final HardwareData.Unit mph

kph

public static final HardwareData.Unit kph

F

public static final HardwareData.Unit F

C

public static final HardwareData.Unit C

spms

public static final HardwareData.Unit spms

tu

public static final HardwareData.Unit tu

windDirection

public static final HardwareData.Unit windDirection

none

public static final HardwareData.Unit none
Method Detail

values

public static final HardwareData.Unit[] 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(HardwareData.Unit c : HardwareData.Unit.values())
        System.out.println(c);

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

valueOf

public static HardwareData.Unit 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

getStringRep

public java.lang.String getStringRep()

getDescription

public java.lang.String getDescription()

convert

public float convert(float value,
                     HardwareData.Unit desiredUnit)

convert

public static float convert(float value,
                            HardwareData.Unit currentUnit,
                            HardwareData.Unit desiredUnit)


Copyright © 2004-2005 David Irwin. All Rights Reserved.