org.eclipse.ohf.stem.core.model
Enum STEMTime.Units

java.lang.Object
  extended by java.lang.Enum<STEMTime.Units>
      extended by org.eclipse.ohf.stem.core.model.STEMTime.Units
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<STEMTime.Units>
Enclosing interface:
STEMTime

public static enum STEMTime.Units
extends java.lang.Enum<STEMTime.Units>

This is an enumeration of different common time units with their duration in milliseconds.


Enum Constant Summary
DAY
           
HOUR
           
MILLISECOND
           
MINUTE
           
SECOND
           
WEEK
           
YEAR
           
 
Method Summary
 long getMilliseconds()
           
static STEMTime.Units valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static STEMTime.Units[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

MILLISECOND

public static final STEMTime.Units MILLISECOND

SECOND

public static final STEMTime.Units SECOND

MINUTE

public static final STEMTime.Units MINUTE

HOUR

public static final STEMTime.Units HOUR

DAY

public static final STEMTime.Units DAY

WEEK

public static final STEMTime.Units WEEK

YEAR

public static final STEMTime.Units YEAR
Method Detail

values

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

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

valueOf

public static STEMTime.Units 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

getMilliseconds

public long getMilliseconds()
Returns:
the number of milliseconds that is equivalent to this time unit.