|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object heaps.event.ComparableTimeAssociation<T>
T
- the class of the object in the associationpublic class ComparableTimeAssociation<T>
An class representing an association between an object and a specified time.
Typically, the time is in units of milliseconds. A natural ordering is
defined between ComparableTimeAssociation
objects by their
associated time.
Constructor Summary | |
---|---|
ComparableTimeAssociation(T _obj,
long _time)
Creates a new association between object _obj and time
_time . |
Method Summary | |
---|---|
int |
compareTo(ComparableTimeAssociation<T> ta)
Compares the time of this TimeAssociation object with the
time of TimeAssociation object ta . |
boolean |
equals(java.lang.Object arg)
Returns whether this TimeAssociation object is equal to
arg . |
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 ComparableTimeAssociation(T _obj, long _time)
_obj
and time
_time
.
_obj
- the object in the association_time
- the time in the associationMethod Detail |
---|
public T getObject()
public long getTime()
public int compareTo(ComparableTimeAssociation<T> ta)
TimeAssociation
object with the
time of TimeAssociation
object ta
.
compareTo
in interface java.lang.Comparable<ComparableTimeAssociation<T>>
ta
- another TimeAssociation
object whose time this object
should compare against
0
if the time of this object is equal to the time
of ta
; -1
if the time of this object is
less than the time of ta
; and 1
if the
time of this object is greater than the time of ta
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
and their times as
returned by method getTime
on each are equal.
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 |