Class HOSContract.ClockV2

  • All Implemented Interfaces:
    Enclosing class:

    public static class HOSContract.ClockV2
    extends java.lang.Object
    implements android.os.Parcelable
    Object representing an HOS clock for version 0.3. A clock contains a descriptive label and the value. The value can be one of the types defined in the HOSContract.ClockV2.ValueType enum. Providers MUST NOT return this data type to a consumer if the consumer has not explicitly signaled support for at least version 0.3 by passing
    to the version parameter of, java.lang.String, java.lang.String, android.os.Bundle).

    An example of the different types of clocks is shown in the image below:

    Hours of service screenshot from the mobile application.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  HOSContract.ClockV2.ValueType
      Allowed types for valueType field.
      • Nested classes/interfaces inherited from interface android.os.Parcelable

        android.os.Parcelable.ClassLoaderCreator<T extends java.lang.Object>, android.os.Parcelable.Creator<T extends java.lang.Object>
    • Field Summary

      Modifier and Type Field Description
      static android.os.Parcelable.Creator<HOSContract.ClockV2> CREATOR  
      • Fields inherited from interface android.os.Parcelable

    • Constructor Summary

      Constructor Description
    • Constructor Detail

      • ClockV2

        public ClockV2()
    • Method Detail

      • setLabel

        public void setLabel​(java.lang.String label)
        Label for the clock.
        label - The clock label.
      • setValue

        public void setValue​(java.lang.String value)
        The value of the clock. The format of this field will depend on the HOSContract.Clock.valueType field.
        value - The clock value.
      • setImportant

        public void setImportant​(boolean important)
        Indicates the important clock. Consumers may interpret this flag in multiple ways, but one possible use is to determine which clock to display in a compact view layout that only permits a single clock to be shown.
        important - Flag indicating which is the most important clock in the list.
      • setLimitsDrivingRange

        public void setLimitsDrivingRange​(boolean limitsDrivingRange)
        Indicates which clock most tightly limits the time a driver can spend driving. Consumers may interpret this flag in multiple ways, but one possible use is to indicate where a driver needs to plan to shut down when planning a route.
        limitsDrivingRange - Flag indicating which clock limits the driving range.
      • getLabel

        public java.lang.String getLabel()
        Get the label for the clock.
        The label for the clock.
      • getValue

        public java.lang.String getValue()
        Get the value for the clock.
        The value for the clock.
      • isImportant

        public boolean isImportant()
        Is the important flag set.
        Flag indicating this is the most important clock.
      • isLimitsDrivingRange

        public boolean isLimitsDrivingRange()
        Is the limitsDrivingRange flag set.
        Flag indicating this clock will limit the driving range.
      • getDurationSeconds

        public java.lang.Double getDurationSeconds()
        Get the duration seconds
        The duration seconds for the clock.
      • setDurationSeconds

        public void setDurationSeconds​(java.lang.Double durationSeconds)
        The duration seconds for the clock.
        durationSeconds - The duration seconds for the clock.
      • describeContents

        public int describeContents()
        Specified by:
        describeContents in interface android.os.Parcelable
      • writeToParcel

        public void writeToParcel​(android.os.Parcel dest,
                                  int flags)
        Specified by:
        writeToParcel in interface android.os.Parcelable