|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.c24.io.api.data.ISO8601Value
biz.c24.io.api.data.ISO8601Time
public class ISO8601Time
An object representing an ISO8601 time.
Warning: Serialized objects of this class or of a deployed class which is derived from it may not be compatible with future releases of C24 Integreation Objects. The current serialization support is appropriate for short term storage or RMI between applications running the same version of C24 Integreation Objects.
ISO8601TimeDataType
,
Serialized FormField Summary |
---|
Fields inherited from class biz.c24.io.api.data.ISO8601Value |
---|
CALENDAR, IO_ISO8601_TIME_ZONE_PRESENT, IO_ISO8601_TIME_ZONE_ZERO, TIME_ZONE_UTC, timeZone |
Constructor Summary | |
---|---|
ISO8601Time()
Constructs a new instance. |
|
ISO8601Time(Date date)
Constructs a new instance from the specified date. |
|
ISO8601Time(long date)
Constructs a new instance from the specified date. |
|
ISO8601Time(long date,
TimeZone timeZone)
Constructs a new instance from the specified date. |
|
ISO8601Time(String str)
Constructs a new instance from the specified string. |
Method Summary | |
---|---|
protected void |
adjustTimeZoneInternal()
Internal calculations required for adjusting this object to the new time zone value. |
int |
compareTo(Object o)
|
static ISO8601Time |
create(String str)
Returns an instance parsed from the specified string. |
boolean |
equals(Object obj)
|
protected static TimeZone |
getDefaultTimeZone()
Returns default time zone. |
short |
getHour()
Returns the hour component of the time. |
short |
getMilliSecond()
Returns the milli second component of the time. |
short |
getMinute()
Returns the minute component of the time. |
short |
getSecond()
Returns the second component of the time. |
short |
getZoneHour()
Returns the hour component of the time zone. |
short |
getZoneMinute()
Returns the minute component of the time zone. |
int |
getZoneOffset()
Returns the zone offset in milliseconds. |
int |
hashCode()
|
boolean |
isNegative()
Returns whether this is a negative time. |
boolean |
isUTC()
Returns whether this is in UTC. |
boolean |
isZoneNegative()
Returns whether the time zone if negative. |
protected void |
setInternal(long date)
Sets internal date/time values using date value. |
Date |
toDate()
Converts this object into a Date . |
long |
toLong()
Converts this object into a long. |
String |
toString()
|
Methods inherited from class biz.c24.io.api.data.ISO8601Value |
---|
adjustTimeZone, getTimeZone, getTimeZoneInternal, setTimeZone, setTimeZone, setZoneOffsetInternal |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ISO8601Time()
public ISO8601Time(String str) throws ParserException
str
- The string to parse.
ParserException
- If the string could not be parsed.public ISO8601Time(Date date)
date
- The date to convert from.public ISO8601Time(long date)
date
- The date to convert from.public ISO8601Time(long date, TimeZone timeZone)
date
- The date to convert from.timeZone
- The time zone to use.Method Detail |
---|
protected void setInternal(long date)
ISO8601Value
setInternal
in class ISO8601Value
date
- date value to usepublic static ISO8601Time create(String str) throws DateFormatException
This convenience factory method works as if by invoking the
ISO8601Time(String)
constructor; any ParserException
thrown by the
constructor is caught and wrapped in a new DateFormatException
object, which is then thrown.
This method is provided for use in situations where it is known that
the given string is a legal value, for example for constants declared
within in a program, and so it would be considered a programming error
for the string not to parse as such. The constructor, which throws a
ParserException
directly, should be used in situations where a
value is being constructed from user input or from some other source that
may be prone to errors.
str
- The string to parse.
DateFormatException
- If the string could not be parsed.
NullPointerException
- If str
is null
.public short getZoneHour()
public short getZoneMinute()
public boolean isZoneNegative()
public int getZoneOffset()
public boolean isUTC()
public short getHour()
public short getMinute()
public short getSecond()
public short getMilliSecond()
public boolean isNegative()
public Date toDate()
ISO8601Value
Date
.
toDate
in class ISO8601Value
public long toLong()
ISO8601Value
toLong
in class ISO8601Value
public String toString()
toString
in class Object
public int compareTo(Object o)
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
protected static TimeZone getDefaultTimeZone()
protected void adjustTimeZoneInternal()
ISO8601Value
adjustTimeZoneInternal
in class ISO8601Value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |