org.apache.axis.types

Class Year

Implemented Interfaces:
java.io.Serializable

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

Implementation of the XML Schema type gYear
Author:
Tom Jordahl
See Also:
XML Schema 3.2.11, Serialized Form

Constructor Summary

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

Method Summary

boolean
equals(Object obj)
String
getTimezone()
int
getYear()
int
hashCode()
Return the value of year XORed with the hashCode of timezone iff one is defined.
void
setTimezone(String timezone)
void
setValue(int year)
void
setValue(int year, String timezone)
void
setYear(int year)
String
toString()

Constructor Details

Year

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

Year

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

Year

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

Method Details

equals

public boolean equals(Object obj)

getTimezone

public String getTimezone()

getYear

public int getYear()

hashCode

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

setTimezone

public void setTimezone(String timezone)

setValue

public void setValue(int year)
            throws NumberFormatException

setValue

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

setYear

public void setYear(int year)

toString

public String toString()

Copyright B) 2005 Apache Web Services Project. All Rights Reserved.