|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object heaps.event.TimeAssociation<T>
T
- the class of the object in the associationpublic class TimeAssociation<T>
An class representing an association between an object and a specified time.
Typically, the time is in units of milliseconds. No natural ordering is defined
on TimeAssociation
objects, but one can be imposed by the
comparators returned by static methods getMinComparator
and
getMaxComparator
.
Constructor Summary | |
---|---|
TimeAssociation(T _obj,
long _time)
Creates a new association between object _obj and time
_time . |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object arg)
Returns whether this TimeAssociation object is equal to
arg . |
static java.util.Comparator<TimeAssociation> |
getMaxComparator()
Returns a comparator such that for two TimeAssociation objects
ta1 and ta2 , ta1 < ta2 if and only
if ta1.getTime() > ta2.getTime . |
static java.util.Comparator<TimeAssociation> |
getMinComparator()
Returns a comparator such that for two TimeAssociation objects
ta1 and ta2 , ta1 < ta2 if and only
if ta1.getTime() < ta2.getTime . |
T |
getObject()
Returns the object in this association. |
long |
getTime()
Returns the time in this association. |
int |
hashCode()
Returns the hash code of this object. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TimeAssociation(T _obj, long _time)
_obj
and time
_time
.
_obj
- the object in the association_time
- the time in the associationMethod Detail |
---|
public static java.util.Comparator<TimeAssociation> getMinComparator()
TimeAssociation
objects
ta1
and ta2
, ta1 < ta2
if and only
if ta1.getTime() < ta2.getTime
.
TimeAssociation
elementspublic static java.util.Comparator<TimeAssociation> getMaxComparator()
TimeAssociation
objects
ta1
and ta2
, ta1 < ta2
if and only
if ta1.getTime() > ta2.getTime
.
TimeAssociation
elementspublic T getObject()
public long getTime()
public boolean equals(java.lang.Object arg)
TimeAssociation
object is equal to
arg
. This method and the provided argument are equal if
the argument is of type TimeAssociation
, their times as
returned by method getTime
on each are equal, and their
contained objects as returned by method getObject
on each
are equivalent by method equals
.
equals
in class java.lang.Object
true
if this object is equal to arg
,
false
otherwisepublic int hashCode()
hashCode
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |