org.apache.axis.types

Class YearMonth

Implemented Interfaces:
java.io.Serializable

public class YearMonth
extends java.lang.Object
implements java.io.Serializable

Implementation of the XML Schema type gYearMonth
Author:
Tom Jordahl
See Also:
XML Schema 3.2.10, Serialized Form

Constructor Summary

YearMonth(String source)
Construct a YearMonth from a String in the format [-]CCYY-MM
YearMonth(int year, int month)
Constructs a YearMonth with the given values No timezone is specified
YearMonth(int year, int month, String timezone)
Constructs a YearMonth with the given values, including a timezone string The timezone is validated but not used.

Method Summary

boolean
equals(Object obj)
int
getMonth()
String
getTimezone()
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
setValue(int year, int month, String timezone)
void
setYear(int year)
String
toString()

Constructor Details

YearMonth

public YearMonth(String source)
            throws NumberFormatException
Construct a YearMonth from a String in the format [-]CCYY-MM

YearMonth

public YearMonth(int year,
                 int month)
            throws NumberFormatException
Constructs a YearMonth with the given values No timezone is specified

YearMonth

public YearMonth(int year,
                 int month,
                 String timezone)
            throws NumberFormatException
Constructs a YearMonth with the given values, including a timezone string The timezone is validated but not used.

Method Details

equals

public boolean equals(Object obj)

getMonth

public int getMonth()

getTimezone

public String getTimezone()

getYear

public int getYear()

hashCode

public int hashCode()
Return the value of (month + year) XORed with the hashCode of timezone iff one is defined.
Returns:
an int value

setMonth

public void setMonth(int month)

setTimezone

public void setTimezone(String timezone)

setValue

public void setValue(int year,
                     int month)
            throws NumberFormatException

setValue

public void setValue(int year,
                     int month,
                     String timezone)
            throws NumberFormatException

setYear

public void setYear(int year)

toString

public String toString()

Copyright © 2005 Apache Web Services Project. All Rights Reserved.