|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.exolab.castor.types.DateTimeBase org.exolab.castor.types.Date org.exolab.castor.types.GMonthDay org.exolab.castor.types.GMonth
Describe an XML schema gMonth type.
The format is defined by W3C XML Schema Recommendation and ISO8601 i.e --MM--(Z|(+|-)hh:mm)
Field Summary |
Fields inherited from class org.exolab.castor.types.Date |
DATE_FORMAT |
Fields inherited from class org.exolab.castor.types.DateTimeBase |
EQUALS, GREATER_THAN, INDETERMINATE, LESS_THAN |
Constructor Summary | |
GMonth()
public only for the generated source code |
|
GMonth(int month)
Constructs a XML Schema GMonth instance given all the values of the different fields. |
|
GMonth(short month)
Constructs a XML Schema GMonth instance given all the values of the different fields. |
|
GMonth(java.lang.String gmonth)
Constructs a GMonth from a string value. |
Method Summary | |
short |
getDay()
|
static java.lang.Object |
parse(java.lang.String str)
parse a String and convert it into an java.lang.Object |
static GMonth |
parseGMonth(java.lang.String str)
parse a String and convert it into a GMonth. |
void |
setDay(short day)
set the Day Field |
java.util.Date |
toDate()
converts this GMonth into a local java Date. |
java.lang.String |
toString()
convert this GMonth to a string The format is defined by W3C XML Schema recommendation and ISO8601 i.e --MM--(Z|(+|-)hh:mm) |
Methods inherited from class org.exolab.castor.types.GMonthDay |
getCentury, getValues, getYear, parseGMonthDay, setCentury, setNegative, setValues, setYear |
Methods inherited from class org.exolab.castor.types.Date |
getHour, getMilli, getMinute, getSeconds, parseDate, setHour, setMilliSecond, setMinute, setSecond |
Methods inherited from class org.exolab.castor.types.DateTimeBase |
addDuration, compareTo, equals, getMonth, getZoneHour, getZoneMinute, hashCode, isLeap, isNegative, isUTC, isZoneNegative, normalize, setMonth, setSecond, setUTC, setZone, setZoneHour, setZoneMinute, setZoneNegative, toCalendar |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public GMonth()
public GMonth(short month)
month
- the month value.public GMonth(int month)
month
- the month value.public GMonth(java.lang.String gmonth) throws java.text.ParseException
gmonth
- the string representation of the GMonth to instantiateMethod Detail |
public java.util.Date toDate()
toDate
in class GMonthDay
public java.lang.String toString()
toString
in class GMonthDay
public static java.lang.Object parse(java.lang.String str) throws java.text.ParseException
str
- the string to parse
java.text.ParseException
- a parse exception is thrown if the string to parse
does not follow the rigth format (see the description
of this class)public static GMonth parseGMonth(java.lang.String str) throws java.text.ParseException
str
- the string to parse
java.text.ParseException
- a parse exception is thrown if the string to parse
does not follow the rigth format (see the description
of this class)public short getDay()
getDay
in class DateTimeBase
public void setDay(short day)
DateTimeBase
setDay
in class DateTimeBase
day
- the value to set up
Note a validation is done on the day field
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |