Package org.apache.axis.types
Class YearMonth
java.lang.Object
org.apache.axis.types.YearMonth
- All Implemented Interfaces:
Serializable
Implementation of the XML Schema type gYearMonth
- Author:
- Tom Jordahl <tomj@macromedia.com>
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionYearMonth
(int year, int month) Constructs a YearMonth with the given values No timezone is specifiedConstructs a YearMonth with the given values, including a timezone string The timezone is validated but not used.Construct a YearMonth from a String in the format [-]CCYY-MM -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
getMonth()
int
getYear()
int
hashCode()
Return the value of (month + year) XORed with the hashCode of timezone iff one is defined.void
setMonth
(int month) void
setTimezone
(String timezone) void
setValue
(int year, int month) void
void
setYear
(int year) toString()
-
Constructor Details
-
YearMonth
Constructs a YearMonth with the given values No timezone is specified- Throws:
NumberFormatException
-
YearMonth
Constructs a YearMonth with the given values, including a timezone string The timezone is validated but not used.- Throws:
NumberFormatException
-
YearMonth
Construct a YearMonth from a String in the format [-]CCYY-MM- Throws:
NumberFormatException
-
-
Method Details
-
getYear
public int getYear() -
setYear
public void setYear(int year) -
getMonth
public int getMonth() -
setMonth
public void setMonth(int month) -
getTimezone
-
setTimezone
-
setValue
- Throws:
NumberFormatException
-
setValue
- Throws:
NumberFormatException
-
toString
-
equals
-
hashCode
public int hashCode()Return the value of (month + year) XORed with the hashCode of timezone iff one is defined.
-