Class Year
- java.lang.Object
-
- org.apache.axis2.databinding.types.Year
-
- All Implemented Interfaces:
Serializable
public class Year extends Object implements Serializable
Implementation of the XML Schema type gYear- See Also:
- XML Schema 3.2.11, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Year(int year)Constructs a Year with the given values No timezone is specifiedYear(int year, String timezone)Constructs a Year with the given values, including a timezone string The timezone is validated but not used.Year(String source)Construct a Year from a String in the format [-]CCYY[timezone]
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)StringgetTimezone()intgetYear()inthashCode()Return the value of year XORed with the hashCode of timezone iff one is defined.voidsetTimezone(String timezone)voidsetValue(int year)voidsetValue(int year, String timezone)voidsetYear(int year)StringtoString()
-
-
-
Constructor Detail
-
Year
public Year(int year) throws NumberFormatExceptionConstructs a Year with the given values No timezone is specified- Throws:
NumberFormatException
-
Year
public Year(int year, String timezone) throws NumberFormatExceptionConstructs a Year with the given values, including a timezone string The timezone is validated but not used.- Throws:
NumberFormatException
-
Year
public Year(String source) throws NumberFormatException
Construct a Year from a String in the format [-]CCYY[timezone]- Throws:
NumberFormatException
-
-
Method Detail
-
getYear
public int getYear()
-
setYear
public void setYear(int year)
-
getTimezone
public String getTimezone()
-
setTimezone
public void setTimezone(String timezone)
-
setValue
public void setValue(int year, String timezone) throws NumberFormatException- Throws:
NumberFormatException
-
setValue
public void setValue(int year) throws NumberFormatException- Throws:
NumberFormatException
-
-