|
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.IlrDuration
public class IlrDuration
This class represents a duration specified by the W3C recommendation
(http://www.w3.org/TR/xmlschema-2/#duration
).
Constructor Summary | |
---|---|
IlrDuration()
Build a null duration. |
|
IlrDuration(boolean positive,
short year,
short month,
short day,
short hour,
short minute,
short second)
Build a duration defined by year/month/day/hour/minute/second. |
|
IlrDuration(String str)
Build a duration from a string. |
Method Summary | |
---|---|
int |
compareTo(IlrDuration date)
Compare two durations. |
boolean |
equals(Object obj)
|
short |
getDay()
Get the day. |
short |
getHour()
Get the hour. |
short |
getMinute()
Get the minute. |
short |
getMonth()
Get the month. |
short |
getSeconds()
Get the second. |
short |
getYear()
Get the year. |
boolean |
isEqual(IlrDuration d)
Determine if two duration objects are equal. |
boolean |
isNegative()
Determine if the duration is negative. |
boolean |
isPositive()
Determine if the duration is positive. |
static IlrDuration |
parse(String str)
Create a duration from a string. |
void |
setDay(short day)
Set the day. |
void |
setHour(short hour)
Set the hour. |
void |
setMinute(short minute)
Set the minute. |
void |
setMonth(short month)
Set the month. |
void |
setSecond(short second)
set the second. |
void |
setSign(boolean positive)
Set the sign of the duration. |
void |
setValue(boolean isPositive,
short year,
short month,
short day,
short hour,
short minute,
short second)
Set the duration. |
void |
setYear(short year)
Set the year. |
String |
toString()
|
static IlrDuration |
valueOf(String str)
Create a duration from a string. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IlrDuration()
public IlrDuration(boolean positive, short year, short month, short day, short hour, short minute, short second)
public IlrDuration(String str) throws IlrDateFormatException
IlrDateFormatException
- when the string has an invalid format.Method Detail |
---|
public void setYear(short year)
public void setMonth(short month)
public void setDay(short day)
public void setHour(short hour)
public void setMinute(short minute)
public void setSecond(short second)
public void setSign(boolean positive)
public void setValue(boolean isPositive, short year, short month, short day, short hour, short minute, short second)
public short getYear()
public short getMonth()
public short getDay()
public short getHour()
public short getMinute()
public short getSeconds()
public boolean isPositive()
public boolean isNegative()
public String toString()
toString
in class Object
public boolean isEqual(IlrDuration d)
IlrDate
to Date
and comparing them.
public boolean equals(Object obj)
equals
in class Object
public int compareTo(IlrDuration date)
public static IlrDuration parse(String str) throws IlrDateFormatException
IlrDateFormatException
- when the string format is invalid.public static IlrDuration valueOf(String str)
IlrDateFormatException
- when the string format is invalid.
|
Rule Execution Server API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |