|
Rule Execution Server API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ilog.rules.xml.types.IlrTimeZone ilog.rules.xml.types.IlrDateTime
public class IlrDateTime
This class represents the time as defined by its date and its time
information. The dateTime built-in type is specified by the W3C XML Schema
Recommendation (http://www.w3.org/TR/xmlschema-2/#dateTime
).
Field Summary |
---|
Fields inherited from class ilog.rules.xml.types.IlrTimeZone |
---|
EQUAL, GREATER, LOWER |
Constructor Summary | |
---|---|
IlrDateTime()
Builds a dateTime structure without any time zone. |
|
IlrDateTime(Date date)
Build an instance from a date without any time zone. |
|
IlrDateTime(Date date,
TimeZone timeZone)
Build an instance from a date and a time zone information. |
|
IlrDateTime(long l)
Builds an IlrDateTime from a long. |
|
IlrDateTime(String str)
Build an instance from a string. |
Method Summary | |
---|---|
int |
compareTo(IlrDateTime date)
Compares two dateTimes . |
boolean |
equals(Object obj)
|
short |
getCentury()
Get the century. |
short |
getDay()
Get the day. |
short |
getHour()
Get the hour. |
short |
getMillisecond()
Get the remaining millisecond. |
short |
getMinute()
Get the minute. |
short |
getMonth()
Get the month of the date. |
short |
getSecond()
Get the second. |
short |
getYear()
Get the year. |
boolean |
isEqual(IlrDateTime dt)
Determines if two dateTime objects are equal. |
boolean |
isPositive()
Determines if the dateTime is positive. |
static IlrDateTime |
parse(String str)
Create an IlrDateTime from a string. |
void |
set(Date date)
Set an instance from a date without time zone support. |
void |
set(Date date,
TimeZone timeZone)
Set an instance from a date and a time zone. |
void |
setDate(short century,
short year,
short month,
short day)
Sets the date part of an instance as century/year/month/day/. |
void |
setPositive(boolean positive)
Sets as a positive dateTime . |
void |
setTime(short hour,
short minute,
short second,
short millisecond)
Sets the time part of a dateTime as
hour/minute/second/millisecond. |
Date |
toDate()
Converts the dateTime to a date instance. |
String |
toString()
|
static IlrDateTime |
valueOf(String str)
Create an IlrDateTime 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 |
---|
public IlrDateTime()
dateTime
structure without any time zone.
public IlrDateTime(long l)
IlrDateTime
from a long.
l
- The long parameterpublic IlrDateTime(Date date)
public IlrDateTime(Date date, TimeZone timeZone)
public IlrDateTime(String str) throws IlrDateFormatException
IlrDateFormatException
- raised when the string format is invalid.Method Detail |
---|
public void set(Date date)
public void set(Date date, TimeZone timeZone)
public void setPositive(boolean positive)
dateTime
.
public void setDate(short century, short year, short month, short day)
public void setTime(short hour, short minute, short second, short millisecond)
dateTime
as
hour/minute/second/millisecond. All the fields must be positive.
public boolean isPositive()
dateTime
is positive.
public short getCentury()
public short getYear()
public short getMonth()
public short getDay()
public short getHour()
public short getMinute()
public short getSecond()
public short getMillisecond()
public Date toDate() throws IlrDateFormatException
dateTime
to a date instance.
IlrDateFormatException
public String toString()
toString
in class IlrTimeZone
public boolean isEqual(IlrDateTime dt)
dateTime
objects are equal. Note that this
comparison is not compliant with the W3C specification. It is equivalent
to converting the IlrDateTime
to Date
and
comparing them.
public boolean equals(Object obj)
equals
in class IlrTimeZone
public int compareTo(IlrDateTime date)
dateTimes
. Note that this comparison is not
compliant with the W3C specification.
public static IlrDateTime parse(String str) throws IlrDateFormatException
IlrDateTime
from a string.
IlrDateFormatException
- when the format is not valid.public static IlrDateTime valueOf(String str)
IlrDateTime
from a string.
IlrDateFormatException
- when the format is not valid.
|
Rule Execution Server API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |