|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.alachisoft.ncache.runtime.util.TimeSpan
public class TimeSpan
TimeSpan class is similiar to .Net System.TimeSpan. Though this class delivers minimal funcitonality that is required to specify "TimeSpan" value. It is used in giving SlidingExpiration value while adding data in NCache.
Constructor Summary | |
---|---|
TimeSpan()
Default Constructor: Initializes a new TimeSpan with zero time span. |
|
TimeSpan(int miliseconds)
Summary: Initializes a new TimeSpan to the specified number of miliseconds. |
|
TimeSpan(int minutes,
int seconds)
Summary: Initializes a new System.TimeSpan to a specified number of minutes and seconds. |
|
TimeSpan(int hours,
int minutes,
int seconds)
Summary: Initializes a new System.TimeSpan to a specified number of hours, minutes and seconds. |
|
TimeSpan(long ticks)
Summary: Initializes a new System.TimeSpan to a specified number of ticks.. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object object)
|
long |
getTotalMiliSeconds()
Summary: This method calculated total miliseconds for this instance of TimeSpan.This includes hours + minutes + seconds + miliseconds computed in miliseconds. |
long |
getTotalTicks()
Summary: This method calculates total ticks for this instance of TimeSpan.This includes hours + minutes + seconds + miliseconds computed in ticks. |
int |
hashCode()
|
void |
setHours(int hours)
Summary: Sets value of hours for this instance of TimeSpan. |
void |
setMiliSeconds(int miliseconds)
Summary: Sets value of miliseconds for this instance of TimeSpan. |
void |
setMinutes(int minutes)
Summary: Sets value of minutes for this instance of TimeSpan. |
void |
setSeconds(int seconds)
Summary: Sets value of seconds for this instance of TimeSpan. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TimeSpan()
public TimeSpan(int miliseconds)
miliseconds
- A time period expressed in miliseconds units.public TimeSpan(int minutes, int seconds)
minutes
- Number of minutes.seconds
- Number of seconds.public TimeSpan(int hours, int minutes, int seconds)
hours
- Number of hours.minutes
- Number of minutes.seconds
- Number of seconds.public TimeSpan(long ticks)
ticks
- A time period expressed in 100-nanosecond units. If ticks value is passed, it overrides other values specified through
hours,minutes,seconds,miliseconds
java.lang.IllegalArgumentException
- The parameters specify a System.TimeSpan value is not positive or out of range.Method Detail |
---|
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public long getTotalMiliSeconds()
public long getTotalTicks()
public int hashCode()
hashCode
in class java.lang.Object
public void setHours(int hours)
hours
- A time period expressed in hours.
java.lang.IllegalArgumentException
- The parameters specify a System.TimeSpan value is not positive or out of range.public void setMiliSeconds(int miliseconds)
muiliseconds
- A time period expressed in miliseconds.
java.lang.IllegalArgumentException
- The parameters specify a System.TimeSpan value is not positive or out of range.public void setMinutes(int minutes)
minutes
- A time period expressed in minutes.
java.lang.IllegalArgumentException
- The parameters specify a System.TimeSpan value is not positive or out of range.public void setSeconds(int seconds)
seconds
- A time period expressed in seconds.
java.lang.IllegalArgumentException
- The parameters specify a System.TimeSpan value is not positive or out of range.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |