|
© 2002 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bea.p13n.xml.schema.Century
This class provides the Java biding for the XML schema type year as specified in Section 3.3.29 of XML Schema Part 2: Datatypes.
year represents a specific period of time that starts at the midnight that starts of the first day of the year and ends at the midnight that ends the last day of the year.
The value space of century is the set of Gregorian calendar centuries specified as CC.
Example: 21
for 21st century
Field Summary | |
protected TimePeriod |
_internal
|
Constructor Summary | |
protected |
Century()
Constructs a new Century instance. |
protected |
Century(long century,
java.util.TimeZone timeZone)
Constructs a new Century for the given century and timezone. |
Method Summary | |
java.lang.Object |
clone()
Returns a copy of this Century. |
int |
compareTo(Century anotherCentury)
Compares this Century to another Century object (represented in the same time zone) in their canonical representation. |
int |
compareTo(java.lang.Object anotherObject)
Compares this Century another object. |
static Century |
createCentury()
Returns a Century instance for the current century. |
static Century |
createCentury(java.lang.String century)
Given a string of the form CC, returns a Century instance. |
long |
getCentury()
Returns the year (CC) field |
int |
getEra()
Returns the era (+/-) |
java.util.TimeZone |
getTimeZone()
Returns the time zone |
void |
setCentury(long century)
Sets the year (CCYY) field |
void |
setEra(int era)
Sets the era (+/-) |
void |
setTimeZone(int zoneHour,
int zoneMinute)
Sets the time zone |
void |
setTimeZone(java.util.TimeZone timeZone)
Sets the time zone |
java.lang.String |
toString()
Returns a XML schema compliant year string. |
java.lang.Object |
toUTC()
Offsets the current century instant to UTC. |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected TimePeriod _internal
Constructor Detail |
protected Century()
protected Century(long century, java.util.TimeZone timeZone)
century
- the century (CC) fieldtimezone
- the timezone. May be null if local.Method Detail |
public static Century createCentury()
public static Century createCentury(java.lang.String century) throws java.text.ParseException
Given a string of the form CC, returns a Century instance.
The argument may optionally include a timezone.
public long getCentury()
public void setCentury(long century) throws java.lang.IllegalArgumentException
century
- the century (CC)public void setTimeZone(int zoneHour, int zoneMinute)
zoneHour
- the hour field of timeZone. Can be negative to
indicate negative offset.zoneMinute
- the minute field of timeZonepublic void setTimeZone(java.util.TimeZone timeZone)
timeZone
- an instance java.util.TimeZonepublic java.util.TimeZone getTimeZone()
public int getEra()
public void setEra(int era)
era
- the era (+/-)public java.lang.Object toUTC()
public java.lang.Object clone()
public int compareTo(Century anotherCentury)
Compares this Century to another Century object (represented in the same time zone) in their canonical representation.
anotherCentury
- another Century object to be compared.public int compareTo(java.lang.Object anotherObject)
object
- the object to be comparedpublic java.lang.String toString()
Returns a XML schema compliant year string.
|
© 2002 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |