Enum FormatUtil.DurationFormatStyle
- java.lang.Object
-
- java.lang.Enum<FormatUtil.DurationFormatStyle>
-
- com.inductiveautomation.ignition.common.FormatUtil.DurationFormatStyle
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<FormatUtil.DurationFormatStyle>
- Enclosing class:
- FormatUtil
public static enum FormatUtil.DurationFormatStyle extends java.lang.Enum<FormatUtil.DurationFormatStyle>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ABBREVIATED
e.g.COMPACT
e.g.LONG
e.g.SHORT
e.g.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FormatUtil.DurationFormatStyle
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static FormatUtil.DurationFormatStyle[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LONG
public static final FormatUtil.DurationFormatStyle LONG
e.g. "4 hours, 5 minutes, 2 seconds
-
SHORT
public static final FormatUtil.DurationFormatStyle SHORT
e.g. "4.2 hours"
-
COMPACT
public static final FormatUtil.DurationFormatStyle COMPACT
e.g. "8:14:02"
-
ABBREVIATED
public static final FormatUtil.DurationFormatStyle ABBREVIATED
e.g. "4h 5m 2s"
-
-
Method Detail
-
values
public static FormatUtil.DurationFormatStyle[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (FormatUtil.DurationFormatStyle c : FormatUtil.DurationFormatStyle.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static FormatUtil.DurationFormatStyle 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 namejava.lang.NullPointerException
- if the argument is null
-
-