Class GpxTimeOffset

java.lang.Object
org.openstreetmap.josm.data.gpx.GpxTimeOffset

public final class GpxTimeOffset extends Object
Time offset of GPX correlation.
Since:
14205 (extracted from CorrelateGpxWithImages)
  • Field Details

  • Constructor Details

  • Method Details

    • milliseconds

      public static GpxTimeOffset milliseconds(long milliseconds)
      Constructs a new GpxTimeOffset from milliseconds.
      Parameters:
      milliseconds - time offset in milliseconds.
      Returns:
      new GpxTimeOffset
    • seconds

      public static GpxTimeOffset seconds(long seconds)
      Constructs a new GpxTimeOffset from seconds.
      Parameters:
      seconds - time offset in seconds.
      Returns:
      new GpxTimeOffset
    • getMilliseconds

      public long getMilliseconds()
      Get time offset in milliseconds.
      Returns:
      time offset in milliseconds
    • getSeconds

      public long getSeconds()
      Get time offset in seconds.
      Returns:
      time offset in seconds
    • formatOffset

      public String formatOffset()
      Formats time offset.
      Returns:
      formatted time offset. Format: decimal number
    • parseOffset

      public static GpxTimeOffset parseOffset(String offset) throws ParseException
      Parses time offset.
      Parameters:
      offset - time offset. Format: decimal number
      Returns:
      time offset
      Throws:
      ParseException - if time offset can't be parsed
    • getDayOffset

      public int getDayOffset()
      Returns the day difference.
      Returns:
      the day difference
    • withoutDayOffset

      Returns offset without day difference.
      Returns:
      offset without day difference
    • splitOutTimezone

      Split out timezone and offset.
      Returns:
      pair of timezone and offset
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object