org.idoox.wasp.serialization.xsdbuiltin
Class GYearMonth

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

public class GYearMonth
extends DateTimeBase
implements java.io.Serializable

The class represents xsd gYearMonth type.

See Also:
Serialized Form
Component:
Core

Field Summary
 
Fields inherited from class org.idoox.wasp.serialization.xsdbuiltin.DateTimeBase
isNegative, timeZone
 
Constructor Summary
GYearMonth(int year, int month, TimeZone timeZone, boolean isNegative)
          Constructor.
GYearMonth(java.lang.String gYearMonth)
          constructor that initializes this object.
 
Method Summary
 boolean equals(java.lang.Object o)
          Equals based on year, month and DateTimeBase values.
 int getMonth()
          Returns month member of this object.
 int getYear()
          Returns year member of this object.
 int hashCode()
           
 void setParams(int year, int month, TimeZone timeZone, boolean isNegative)
          Sets parameters of this object.
 java.lang.String toString()
          deserializes this object to XSD string that represents date.
 
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

GYearMonth

public GYearMonth(int year,
                  int month,
                  TimeZone timeZone,
                  boolean isNegative)
           throws DateTimeException
Constructor. Initializes gYearMonth object.

Parameters:
year - a value of year.
month - a value of month in the interval 0-11.
timeZone - timeZone a value of time zone. It may be null.
isNegative - indicates that it is negative dateTime.
Throws:
DateTimeException - thrown when parameters are invalid.

GYearMonth

public GYearMonth(java.lang.String gYearMonth)
           throws java.lang.Exception
constructor that initializes this object.

Parameters:
gYearMonth - the string representation.
Throws:
java.lang.Exception - thrown when parameters are invalid.
Method Detail

setParams

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

Parameters:
year - a value of year.
month - a value of month in the interval 0-11.
timeZone - a value of time zone. It may be null.
isNegative - indicates that it is negative dateTime.
Throws:
DateTimeException - thrown when parameters are invalid.

toString

public java.lang.String toString()
deserializes this object to XSD string that represents date.

Returns:
String date represent of the object.

getYear

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

Returns:
year member of this object.

getMonth

public int getMonth()
Returns month member of this object.

Returns:
month member of this object in the interval 0-11.

equals

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


hashCode

public int hashCode()