public enum TimeUnitProperty extends Enum<TimeUnitProperty>
Enum Constant and Description |
---|
HOURS |
MILLISECONDS |
MINUTES |
SECONDS |
Modifier and Type | Method and Description |
---|---|
static long |
getParsedValue(String time) |
static long |
getParsedValue(String time,
TimeUnitProperty defaultTimeUnit)
Parse the time using the provided TimeUnitProperty.
|
static long |
getProperty(String key,
String def)
Get the property from the system properties and parse it according the matching pattern.
|
static long |
getProperty(String key,
String def,
TimeUnitProperty defaultTimeUnit)
Get the property from the system properties and parse it according the matching pattern
|
static TimeUnitProperty |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TimeUnitProperty[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TimeUnitProperty MILLISECONDS
public static final TimeUnitProperty SECONDS
public static final TimeUnitProperty MINUTES
public static final TimeUnitProperty HOURS
public static TimeUnitProperty[] values()
for (TimeUnitProperty c : TimeUnitProperty.values()) System.out.println(c);
public static TimeUnitProperty 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 static long getProperty(String key, String def)
public static long getProperty(String key, String def, TimeUnitProperty defaultTimeUnit)
public static long getParsedValue(String time, TimeUnitProperty defaultTimeUnit)
public static long getParsedValue(String time)
Copyright © GigaSpaces.