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 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 Detail
-
Year
public Year(int year) throws NumberFormatException
Constructs a Year with the given values No timezone is specified- Throws:
NumberFormatException
-
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.- 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
-
-