public class TimePosition extends Object implements ITimePosition, Comparable<ITimePosition>, Serializable
Modifier and Type | Field and Description |
---|---|
static String |
DAY_PATTERN |
static String |
HOUR_PATTERN |
static String |
MINUTE_PATTERN |
static String |
MONTH_PATTERN |
static String |
SECOND_PATTERN |
static String |
UTC_PATTERN |
static String |
YEAR_PATTERN |
Constructor and Description |
---|
TimePosition(String timePos)
Constructs a
TimePosition out of a ISO 8601 String. |
Modifier and Type | Method and Description |
---|---|
boolean |
after(ITimePosition timePosP) |
boolean |
before(ITimePosition timePosP) |
int |
compare(ITimePosition o1,
ITimePosition o2) |
int |
compareTo(ITimePosition timePosP) |
boolean |
equals(Object obj) |
Calendar |
getCalendar() |
int |
getDay() |
int |
getHour() |
int |
getMinute() |
int |
getMonth() |
float |
getSecond() |
ITimeResolution |
getTimeResolution()
Deprecated.
Returned value was always null because it could never been set.
Will be remove in next major version.
|
String |
getTimezone() |
long |
getYear() |
int |
hashCode() |
void |
setTimezone(String timezone) |
String |
toISO8601Format() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public static final String YEAR_PATTERN
public static final String MONTH_PATTERN
public static final String DAY_PATTERN
public static final String HOUR_PATTERN
public static final String MINUTE_PATTERN
public static final String SECOND_PATTERN
public static final String UTC_PATTERN
public TimePosition(String timePos) throws IllegalArgumentException
TimePosition
out of a ISO 8601 String. The string has at least to indicate the year.timePos
- a ISO 8601 compliant String
IllegalArgumentException
- null
or -public long getYear()
getYear
in interface ITimePosition
public int getMonth()
getMonth
in interface ITimePosition
public int getDay()
getDay
in interface ITimePosition
public int getHour()
getHour
in interface ITimePosition
public int getMinute()
getMinute
in interface ITimePosition
public float getSecond()
getSecond
in interface ITimePosition
public ITimeResolution getTimeResolution()
public String toISO8601Format()
toISO8601Format
in interface ITime
public String toString()
public boolean equals(Object obj)
equals
in interface Comparator<ITimePosition>
equals
in class Object
public int compareTo(ITimePosition timePosP)
compareTo
in interface Comparable<ITimePosition>
public int compare(ITimePosition o1, ITimePosition o2)
compare
in interface Comparator<ITimePosition>
public boolean before(ITimePosition timePosP)
before
in interface ITimePosition
timePosP
- the timeposition to check againstpublic boolean after(ITimePosition timePosP)
after
in interface ITimePosition
timePosP
- the timeposition to check againstpublic Calendar getCalendar()
getCalendar
in interface ITimePosition
Calendar
object.public String getTimezone()
getTimezone
in interface ITimePosition
public void setTimezone(String timezone)
Copyright © 2012–2017 52North Initiative for Geospatial Open Source Software GmbH. All rights reserved.