|
||||||||||
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.ISO8601GYear
public class ISO8601GYear
An object representing an ISO8601 gYear.
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.
ISO8601GYearDataType
,
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 | |
---|---|
ISO8601GYear()
Constructs a new instance. |
|
ISO8601GYear(Date date)
Constructs a new instance from the specified date. |
|
ISO8601GYear(long date)
Constructs a new instance from the specified date. |
|
ISO8601GYear(long date,
TimeZone timeZone)
Constructs a new instance from the specified date. |
|
ISO8601GYear(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 ISO8601GYear |
create(String str)
Returns an instance parsed from the specified string. |
boolean |
equals(Object obj)
|
short |
getCentury()
Returns the century component of the date. |
short |
getYear()
Returns the year component of the date. |
short |
getZoneHour()
Returns the hour component of the time zone. |
short |
getZoneMinute()
Returns the minute component of the time zone. |
int |
hashCode()
|
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, getDefaultTimeZone, getTimeZone, getTimeZoneInternal, setTimeZone, setTimeZone, setZoneOffsetInternal |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ISO8601GYear()
public ISO8601GYear(String str) throws ParserException
str
- The string to parse.
ParserException
- If the string could not be parsed.public ISO8601GYear(Date date)
date
- The date to convert from.public ISO8601GYear(long date)
date
- The date to convert from.public ISO8601GYear(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 ISO8601GYear create(String str) throws DateFormatException
This convenience factory method works as if by invoking the
ISO8601GYear(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 boolean isUTC()
public short getCentury()
public short getYear()
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 void adjustTimeZoneInternal()
ISO8601Value
adjustTimeZoneInternal
in class ISO8601Value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |