public final class GpxTimeOffset extends java.lang.Object
CorrelateGpxWithImages
)Modifier and Type | Field and Description |
---|---|
private long |
milliseconds |
static GpxTimeOffset |
ZERO
The time offset 0.
|
Modifier | Constructor and Description |
---|---|
private |
GpxTimeOffset(long milliseconds) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.lang.String |
formatOffset()
Formats time offset.
|
int |
getDayOffset()
Returns the day difference.
|
long |
getMilliseconds()
Get time offset in milliseconds.
|
long |
getSeconds()
Get time offset in seconds.
|
int |
hashCode() |
static GpxTimeOffset |
milliseconds(long milliseconds)
Constructs a new
GpxTimeOffset from milliseconds. |
static GpxTimeOffset |
parseOffset(java.lang.String offset)
Parses time offset.
|
static GpxTimeOffset |
seconds(long seconds)
Constructs a new
GpxTimeOffset from seconds. |
Pair<GpxTimezone,GpxTimeOffset> |
splitOutTimezone()
Split out timezone and offset.
|
GpxTimeOffset |
withoutDayOffset()
Returns offset without day difference.
|
public static final GpxTimeOffset ZERO
private final long milliseconds
private GpxTimeOffset(long milliseconds)
public static GpxTimeOffset milliseconds(long milliseconds)
GpxTimeOffset
from milliseconds.milliseconds
- time offset in milliseconds.GpxTimeOffset
public static GpxTimeOffset seconds(long seconds)
GpxTimeOffset
from seconds.seconds
- time offset in seconds.GpxTimeOffset
public long getMilliseconds()
public long getSeconds()
public java.lang.String formatOffset()
public static GpxTimeOffset parseOffset(java.lang.String offset) throws java.text.ParseException
offset
- time offset. Format: decimal numberjava.text.ParseException
- if time offset can't be parsedpublic int getDayOffset()
public GpxTimeOffset withoutDayOffset()
public Pair<GpxTimezone,GpxTimeOffset> splitOutTimezone()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object