org.apache.axis2.databinding.types
Class Year

java.lang.Object
  extended by 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
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.
Year(String source)
          Construct a Year from a String in the format [-]CCYY[timezone]
 
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()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

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

Overrides:
hashCode in class Object
Returns:
an int value


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.