|
© 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 | +--com.bea.p13n.xml.schema.Year
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.
The schema type 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 year is the set of Gregorian calendar years specified as CCYY.
Example: 2001
.
Fields inherited from class com.bea.p13n.xml.schema.Century |
_internal |
Constructor Summary | |
protected |
Year()
Constructs a new Year instance. |
protected |
Year(long year,
java.util.TimeZone timeZone)
Constructs a new Year for the given year and timezone. |
Method Summary | |
java.lang.Object |
clone()
Returns a copy of this Year. |
int |
compareTo(java.lang.Object anotherObject)
Compares this Year another object. |
int |
compareTo(Year anotherYear)
Compares this Year to another Year object (represented in the same time zone) in their canonical representation. |
static Year |
createYear()
Returns a Year instance for the current year. |
static Year |
createYear(java.lang.String year)
Given a string of the form CCYY, returns a Year instance. |
long |
getYear()
Returns the year (CCYY) field |
void |
setYear(int century,
int year)
Sets the year (CCYY) field |
void |
setYear(long year)
Sets the year (CCYY) field |
java.lang.String |
toString()
Returns a XML schema compliant year string. |
java.lang.Object |
toUTC()
Offsets the current month instant to UTC. |
Methods inherited from class com.bea.p13n.xml.schema.Century |
compareTo,
createCentury,
createCentury,
getCentury,
getEra,
getTimeZone,
setCentury,
setEra,
setTimeZone,
setTimeZone |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
protected Year()
protected Year(long year, java.util.TimeZone timeZone)
year
- the year (CCYY) fieldtimezone
- the timezone. May be null if local.Method Detail |
public static Year createYear()
public static Year createYear(java.lang.String year) throws java.text.ParseException
Given a string of the form CCYY, returns a Year instance.
The argument may optionally include a timezone.
public long getYear()
public void setYear(int century, int year) throws java.lang.IllegalArgumentException
century
- the century (CC)year
- the year (YY)public void setYear(long year)
the
- year (CCYY)public java.lang.Object toUTC()
public java.lang.Object clone()
public int compareTo(Year anotherYear)
Compares this Year to another Year object (represented in the same time zone) in their canonical representation.
anotherYear
- another Year 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 |