public enum SimonUnit extends Enum<SimonUnit>
Enum Constant and Description |
---|
MICROSECOND |
MILLISECOND |
NANOSECOND |
SECOND |
Modifier and Type | Method and Description |
---|---|
int |
getDivisor()
Returns number of nanoseconds in this unit.
|
String |
getSymbol()
Returns the symbol of time unit.
|
static SimonUnit |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SimonUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SimonUnit NANOSECOND
public static final SimonUnit MICROSECOND
public static final SimonUnit MILLISECOND
public static SimonUnit[] values()
for (SimonUnit c : SimonUnit.values()) System.out.println(c);
public static SimonUnit valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int getDivisor()
Copyright © 2019. All rights reserved.