Package org.opencabstandard.provider
Enum HOSContract.ClockV2.ValueType
- java.lang.Object
-
- java.lang.Enum<HOSContract.ClockV2.ValueType>
-
- org.opencabstandard.provider.HOSContract.ClockV2.ValueType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<HOSContract.ClockV2.ValueType>
- Enclosing class:
- HOSContract.ClockV2
public static enum HOSContract.ClockV2.ValueType extends java.lang.Enum<HOSContract.ClockV2.ValueType>
Allowed types for valueType field.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description COUNTDOWN
Indicates that the value field will contain a date in RFC3339 format that will be shown as a clock counting down to zero.COUNTUP
Indicates that the value field will contain a date in RFC3339 format that will be shown as a clock counting up from the provided date.DATE
Indicates that the value field will contain a date in RFC3339 format.STRING
You can also use a string for an ELD clock duration (like 4:32) if you want to ensure your own specific rounding and formatting logic is used.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
toString()
static HOSContract.ClockV2.ValueType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static HOSContract.ClockV2.ValueType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
STRING
public static final HOSContract.ClockV2.ValueType STRING
You can also use a string for an ELD clock duration (like 4:32) if you want to ensure your own specific rounding and formatting logic is used. In this case, providers SHOULD provide the actual duration in seconds using theHOSContract.ClockV2.durationSeconds
property. Consumers MUST display thevalue
, but MAY useHOSContract.ClockV2.durationSeconds
for business logic other than pure information display.
-
DATE
public static final HOSContract.ClockV2.ValueType DATE
Indicates that the value field will contain a date in RFC3339 format. The date will appear formatted as "MM/dd/yyyy". An example for this type of clock could be the date of next required truck service.
-
COUNTUP
public static final HOSContract.ClockV2.ValueType COUNTUP
Indicates that the value field will contain a date in RFC3339 format that will be shown as a clock counting up from the provided date. An example for this type of clock could be the number of hours since last rest.
-
COUNTDOWN
public static final HOSContract.ClockV2.ValueType COUNTDOWN
Indicates that the value field will contain a date in RFC3339 format that will be shown as a clock counting down to zero. The counter will not go below zero. An example for this type of clock could be the remaining available drive time.
-
-
Method Detail
-
values
public static HOSContract.ClockV2.ValueType[] 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 (HOSContract.ClockV2.ValueType c : HOSContract.ClockV2.ValueType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static HOSContract.ClockV2.ValueType 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
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<HOSContract.ClockV2.ValueType>
-
-