org.idoox.wasp.serialization.xsdbuiltin
Class GMonth

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

public class GMonth
extends DateTimeBase
implements java.io.Serializable

The class represents XMLSchema gMonth type.

See Also:
Serialized Form
Component:
Core

Field Summary
 
Fields inherited from class org.idoox.wasp.serialization.xsdbuiltin.DateTimeBase
isNegative, timeZone
 
Constructor Summary
GMonth(int month, TimeZone timeZone)
          Constructor.
GMonth(java.lang.String gMonth)
          Constructor that initializes this object.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int getMonth()
          Returns month member of this object in the interval 0-11.
 int hashCode()
           
 void setParams(int month, TimeZone timeZone)
          Sets parameters of this object.
 java.lang.String toString()
          Deserializes this object to XSD string that represents month.
 
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

GMonth

public GMonth(int month,
              TimeZone timeZone)
       throws DateTimeException
Constructor. Initializes gMonth object.

Parameters:
month - a value of month in the interval 0-11.
timeZone - a timeZone value to set.
Throws:
DateTimeException - thrown when parameters are invalid.

GMonth

public GMonth(java.lang.String gMonth)
       throws DateTimeException
Constructor that initializes this object.

Note that in SSJ versions 5.5 and earlier, this constructor accepted only the format --MM--, which was described in XML Schema version 02 May 2001. However, the correct format is --MM, in compliance with ISO 8601 and used in more recent versions of XML Schema. This method accepts both formats, to ensure backward compatibility. To disable the warning for the old format, set the JVM property -Dssj.xmlschema2001.gmonth=true.

Parameters:
gMonth - XML Schema representation of month.
Throws:
DateTimeException - Description of Exception
Method Detail

setParams

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

Parameters:
month - a value of month in interval (0-11).
timeZone - a timeZone value to set.
Throws:
DateTimeException - thrown when parameters are invalid.

toString

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

See also the note for GMonth(String). The new format is used, unless -Dssj.xmlschema2001.gmonth=true is set. Note, however, that it is not recommended to depend on the format of the string returned by this method.

Returns:
String month-represent of the object.

getMonth

public int getMonth()
Returns month member of this object in the interval 0-11.

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

equals

public boolean equals(java.lang.Object o)

hashCode

public int hashCode()