Rule Execution Server API

ilog.rules.xml.types
Class IlrGMonth

java.lang.Object
  extended by ilog.rules.xml.types.IlrTimeZone
      extended by ilog.rules.xml.types.IlrGMonth
All Implemented Interfaces:
Serializable

public class IlrGMonth
extends IlrTimeZone

This class represents the simple type gMonth of the W3C XML Schema Recommendation (http://www.w3.org/TR/xmlschema-2/#gMonth ).

See Also:
Serialized Form

Field Summary
 
Fields inherited from class ilog.rules.xml.types.IlrTimeZone
EQUAL, GREATER, LOWER
 
Constructor Summary
IlrGMonth()
          Builds a gMonth instance without time zone.
IlrGMonth(Date date)
          Builds a gMonth instance without time zone from a date.
IlrGMonth(Date date, TimeZone timeZone)
          Builds a gMonth instance from a date and a time zone.
IlrGMonth(long l)
          Builds an IlrGMonth from a long.
IlrGMonth(String str)
          Builds a gMonth from a string.
 
Method Summary
 int compareTo(IlrGMonth date)
          Compares two months.
 boolean equals(Object obj)
           
 short getMonth()
          Gets the month.
 boolean isEqual(IlrGMonth dt)
          Determines if two gMonth are equal.
static IlrGMonth parse(String str)
          Creates a GMonth from a string.
 void set(Date date)
          Sets the gMonth from a date.
 void set(Date date, TimeZone timeZone)
          Sets a gMonth from a date and a time zone.
 void setMonth(short month)
          Sets the month.
 Date toDate()
          Converts the gMonth to a date.
 String toString()
           
static IlrGMonth valueOf(String str)
          Creates a GMonth from a string.
 
Methods inherited from class ilog.rules.xml.types.IlrTimeZone
formatToString, formatToString, getTimeZoneInMillis, getZoneHour, getZoneMinute, isEqual, isUTC, isZonePositive, setTimeZone, setTimeZoneInMillis, setUTC, toTimeZone, unsetUTC
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlrGMonth

public IlrGMonth()
Builds a gMonth instance without time zone.


IlrGMonth

public IlrGMonth(long l)
Builds an IlrGMonth from a long.

Parameters:
l - The long parameter

IlrGMonth

public IlrGMonth(Date date)
Builds a gMonth instance without time zone from a date.


IlrGMonth

public IlrGMonth(Date date,
                 TimeZone timeZone)
Builds a gMonth instance from a date and a time zone.


IlrGMonth

public IlrGMonth(String str)
          throws IlrDateFormatException
Builds a gMonth from a string.

Throws:
IlrDateFormatException - When the string format is invalid.
Method Detail

set

public void set(Date date)
Sets the gMonth from a date.


set

public void set(Date date,
                TimeZone timeZone)
Sets a gMonth from a date and a time zone.


setMonth

public void setMonth(short month)
Sets the month.


getMonth

public short getMonth()
Gets the month.


toDate

public Date toDate()
            throws IlrDateFormatException
Converts the gMonth to a date.

Throws:
IlrDateFormatException

toString

public String toString()
Overrides:
toString in class IlrTimeZone

isEqual

public boolean isEqual(IlrGMonth dt)
Determines if two gMonth are equal.


equals

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

compareTo

public int compareTo(IlrGMonth date)
Compares two months. A GREATER comparison result means that the current month is after the month used as parameter.

Returns:
EQUAL if equal, GREATER or LOWER, or NOT_COMPARABLE.

parse

public static IlrGMonth parse(String str)
                       throws IlrDateFormatException
Creates a GMonth from a string.

Throws:
IlrDateFormatException - When the string format is invalid.

valueOf

public static IlrGMonth valueOf(String str)
Creates a GMonth from a string.

Throws:
IlrDateFormatException - When the string format is invalid.

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013