org.idoox.wasp.serialization.xsdbuiltin
Class GYear

java.lang.Object
  extended byorg.idoox.wasp.serialization.xsdbuiltin.DateTimeBase
      extended byorg.idoox.wasp.serialization.xsdbuiltin.GYear
All Implemented Interfaces:
java.io.Serializable

public class GYear
extends DateTimeBase
implements java.io.Serializable

The class represents xsd year type.

See Also:
Serialized Form
Component:
Core

Field Summary
 
Fields inherited from class org.idoox.wasp.serialization.xsdbuiltin.DateTimeBase
isNegative, timeZone
 
Constructor Summary
GYear(int year, TimeZone timeZone, boolean isNegative)
          Constructor.
GYear(java.lang.String gYear)
          constructor that initializes this object.
 
Method Summary
 boolean equals(java.lang.Object o)
          Equals base on year and DateTimeBase values.
 int getYear()
          Returns year member of this object.
 int hashCode()
           
 void setParams(int year, TimeZone timeZone, boolean isNegative)
          Sets parameters of this object.
 java.lang.String toString()
          Deserializes this object to XSD string that represents year.
 
Methods inherited from class org.idoox.wasp.serialization.xsdbuiltin.DateTimeBase
getTimeZone, hasNegativeValue, inputMonth, outputMonth, setDefaultTimeZone, setParams
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GYear

public GYear(int year,
             TimeZone timeZone,
             boolean isNegative)
      throws DateTimeException
Constructor. Initializes gYear object.

Parameters:
year - a value of year.
timeZone - a timeZone value to set.
isNegative - defines wherether this object has negative value.
Throws:
DateTimeException - thrown when parameters are invalid.

GYear

public GYear(java.lang.String gYear)
      throws DateTimeException
constructor that initializes this object.

Parameters:
gYear - the XML Schema representation.
Throws:
DateTimeException - thrown when parameters are invalid.
Method Detail

setParams

public void setParams(int year,
                      TimeZone timeZone,
                      boolean isNegative)
               throws DateTimeException
Sets parameters of this object.

Parameters:
year - a value of year.
timeZone - a timeZone value to set.
isNegative - defines wherether this object has negative value.
Throws:
DateTimeException - thrown when parameters are invalid.

toString

public java.lang.String toString()
Deserializes this object to XSD string that represents year.

Returns:
String year represent of the object.

getYear

public int getYear()
Returns year member of this object.

Returns:
year member of this object.

equals

public boolean equals(java.lang.Object o)
Equals base on year and DateTimeBase values.


hashCode

public int hashCode()