be.ac.ulg.montefiore.run.totem.domain.model
Enum DelayUnit

java.lang.Object
  extended by java.lang.Enum<DelayUnit>
      extended by be.ac.ulg.montefiore.run.totem.domain.model.DelayUnit
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DelayUnit>

public enum DelayUnit
extends java.lang.Enum<DelayUnit>

An enum class that expresses delay units.

Creation date: 06-avr.-07

Author:
Jean Lepropre (lepropre@run.montefiore.ulg.ac.be)

Enum Constant Summary
µS
           
DEFAULT_UNIT
           
MS
           
NS
           
S
           
 
Method Summary
 float convert(DelayUnit convertFrom, float number)
          Converts a float in the unit given as parameter to the unit of this enum.
static DelayUnit valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static DelayUnit[] 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

DEFAULT_UNIT

public static final DelayUnit DEFAULT_UNIT

NS

public static final DelayUnit NS

µS

public static final DelayUnit µS

MS

public static final DelayUnit MS

S

public static final DelayUnit S
Method Detail

values

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

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

valueOf

public static DelayUnit 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

convert

public float convert(DelayUnit convertFrom,
                     float number)
Converts a float in the unit given as parameter to the unit of this enum.

Parameters:
convertFrom - The unit in which number must be interpreted
number - The float to convert
Returns:
the float converted in the unit of this object


Copyright © 2004-2007 Research Unit in Networking, All Rights Reserved.