Class LocationTime

  • java.lang.Object
    • com.here.sdk.core.LocationTime

  • public final class LocationTime
    extends java.lang.Object

    This struct presents all the time data tied to a location, like an arrival or departure time. The time data is originally specified in RFC 3339, section 5.6 format. For example, "2022-03-23T16:07:31+01:00" in Cracow, Poland, i.e. a Central European Time (CET) location. Note that this struct doesn't give any data on the tied location. The location should be derived from the context.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.util.Date localTime
      The time as observed in the tied location.
      Duration utcOffset
      The UTC offset is the difference between the local time and the Coordinated Universal Time (UTC) in seconds.
      java.util.Date utcTime
      The time as Coordinated Universal Time (UTC).
    • Constructor Summary

      Constructors 
      Constructor Description
      LocationTime​(java.util.Date localTime, java.util.Date utcTime, Duration utcOffset)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • localTime

        @NonNull
        public final java.util.Date localTime

        The time as observed in the tied location. For example, if a route is requested in Cracow, Poland, the local time is "2022-03-23T16:07:31" in CET, i.e. one hour ahead of the UTC time.

      • utcTime

        @NonNull
        public final java.util.Date utcTime

        The time as Coordinated Universal Time (UTC). For example, if a route is requested in Poland, the UTC time is "2022-03-23T15:07:31", i.e. one hour behind the local time.

      • utcOffset

        @NonNull
        public final Duration utcOffset

        The UTC offset is the difference between the local time and the Coordinated Universal Time (UTC) in seconds. For example, if the local time is UTC+01:00, it is +3600 and if the local time is UTC-05:00, it is -18000.

    • Constructor Detail

      • LocationTime

        public LocationTime​(@NonNull
                            java.util.Date localTime,
                            @NonNull
                            java.util.Date utcTime,
                            @NonNull
                            Duration utcOffset)

        Creates a new instance.

        Parameters:
        localTime -

        The time as observed in the tied location. For example, if a route is requested in Cracow, Poland, the local time is "2022-03-23T16:07:31" in CET, i.e. one hour ahead of the UTC time.

        utcTime -

        The time as Coordinated Universal Time (UTC). For example, if a route is requested in Poland, the UTC time is "2022-03-23T15:07:31", i.e. one hour behind the local time.

        utcOffset -

        The UTC offset is the difference between the local time and the Coordinated Universal Time (UTC) in seconds. For example, if the local time is UTC+01:00, it is +3600 and if the local time is UTC-05:00, it is -18000.

    • Method Detail

      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object