Rule Execution Server API

ilog.rules.xml.types
Class IlrGDay

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

public class IlrGDay
extends IlrTimeZone

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

See Also:
Serialized Form

Field Summary
 
Fields inherited from class ilog.rules.xml.types.IlrTimeZone
EQUAL, GREATER, LOWER
 
Constructor Summary
IlrGDay()
          Builds a GDay without any time zone.
IlrGDay(Date date)
          Builds a date from a Date instance.
IlrGDay(Date date, TimeZone timeZone)
          Builds a gDay from date and a time zone.
IlrGDay(long l)
          Builds an IlrGDay from a long.
IlrGDay(String str)
          Builds a gDay from a string.
 
Method Summary
 int compareTo(IlrGDay date)
          Compares two days.
 boolean equals(Object obj)
           
 short getDay()
          Gets the day.
 boolean isEqual(IlrGDay dt)
          Determines if two gDay instances are equal.
static IlrGDay parse(String str)
          Creates a day from a string.
 void set(Date date)
          Sets a gDay from a date.
 void set(Date date, TimeZone timeZone)
          Sets a gDay from a date and a time zone.
 void setDay(short day)
          Sets the day.
 Date toDate()
          Converts into a date.
 String toString()
           
static IlrGDay valueOf(String str)
          Creates a day 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

IlrGDay

public IlrGDay()
Builds a GDay without any time zone.


IlrGDay

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

Parameters:
l - The long parameter

IlrGDay

public IlrGDay(Date date)
Builds a date from a Date instance.


IlrGDay

public IlrGDay(Date date,
               TimeZone timeZone)
Builds a gDay from date and a time zone.


IlrGDay

public IlrGDay(String str)
        throws IlrDateFormatException
Builds a gDay from a string.

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

set

public void set(Date date)
Sets a gDay from a date.


set

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


setDay

public void setDay(short day)
Sets the day.


getDay

public short getDay()
Gets the day.


toDate

public Date toDate()
            throws IlrDateFormatException
Converts into a date.

Throws:
IlrDateFormatException

toString

public String toString()
Overrides:
toString in class IlrTimeZone

isEqual

public boolean isEqual(IlrGDay dt)
Determines if two gDay instances are equal.


equals

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

compareTo

public int compareTo(IlrGDay date)
Compares two days. A GREATER comparison result means that the current day is after the day used as the parameter.

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

parse

public static IlrGDay parse(String str)
                     throws IlrDateFormatException
Creates a day from a string.

Throws:
IlrDateFormatException - when the string format is invalid.

valueOf

public static IlrGDay valueOf(String str)
Creates a day from a string.

Throws:
IlrDateFormatException - when the string format is invalid.

Rule Execution Server API

© Copyright IBM Corp. 1987, 2012