|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.util.TimeIntervalElement
public class TimeIntervalElement
Implements the TimeInterval interface.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.caucho.util.TimeInterval |
|---|
TimeInterval.Comparison |
| Constructor Summary | |
|---|---|
TimeIntervalElement(long starts,
long stops)
|
|
| Method Summary | |
|---|---|
int |
compare(TimeInterval interval1,
TimeInterval interval2)
|
int |
compareTo(TimeInterval interval)
The recommended implementation of this method is: public int compareTo(E element)
{
return comparison(element).value();
}
|
TimeInterval.Comparison |
compareWith(TimeInterval other)
Returns a result that provides a ComparableElement.Comparison of this element
with that of the element parameter. |
boolean |
current()
Returns true if the interval is current. |
boolean |
current(long time)
Returns true if the interval is current at the time specified. |
long |
duration()
Returns the duration of the interval in milliseconds. |
boolean |
equals(java.lang.Object other)
|
TimeInterval |
getTimeInterval()
Returns the current time interval. |
int |
hashCode()
Returns the hashCode that was calculated when this immutable instance was instantiated. |
protected long |
intervalNow()
Provides the current time for use by the interval. |
long |
startTime()
Returns the time that the interval starts in milliseconds. |
long |
stopTime()
Returns the time that the interval ends in milliseconds. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TimeIntervalElement(long starts,
long stops)
| Method Detail |
|---|
public final long startTime()
TimeInterval
startTime in interface TimeIntervalpublic final long stopTime()
TimeInterval
stopTime in interface TimeIntervalpublic final long duration()
TimeInterval
duration in interface TimeIntervalpublic final boolean current()
TimeInterval
current in interface TimeIntervalpublic final boolean current(long time)
TimeInterval
current in interface TimeIntervalpublic final boolean equals(java.lang.Object other)
equals in interface java.util.Comparator<TimeInterval>equals in class java.lang.Objectpublic final int hashCode()
hashCode in class java.lang.Objectpublic final int compareTo(TimeInterval interval)
ComparableElementpublic int compareTo(E element)
{
return comparison(element).value();
}
compareTo in interface ComparableElement<TimeInterval>compareTo in interface java.lang.Comparable<TimeInterval>
public final int compare(TimeInterval interval1,
TimeInterval interval2)
compare in interface java.util.Comparator<TimeInterval>public final TimeInterval.Comparison compareWith(TimeInterval other)
ComparableElementComparableElement.Comparison of this element
with that of the element parameter.
compareWith in interface ComparableElement<TimeInterval>other - to be compared with.
protected long intervalNow()
public TimeInterval getTimeInterval()
TimeIntervalEntry
getTimeInterval in interface TimeIntervalEntrypublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||