Package org.jreliability.common
Class Occurrence<T>
- java.lang.Object
-
- org.jreliability.common.Occurrence<T>
-
- Type Parameters:
T
- the object that is effected by the occurrence
- All Implemented Interfaces:
java.lang.Comparable<Occurrence<T>>
- Direct Known Subclasses:
Failure
public abstract class Occurrence<T> extends java.lang.Object implements java.lang.Comparable<Occurrence<T>>
TheOccurrence
represents an occurrence or event, e.g., the failure or repair of an object at a given time.
-
-
Constructor Summary
Constructors Constructor Description Occurrence(T t, double time)
Constructs anOccurrence
with a given object and the time.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Occurrence<T> other)
T
getObject()
Returns the object.double
getTime()
Returns the time.
-
-
-
Field Detail
-
t
protected final T t
The elementT
.
-
time
protected final java.lang.Double time
The time of the occurrence.
-
-
Constructor Detail
-
Occurrence
public Occurrence(T t, double time)
Constructs anOccurrence
with a given object and the time.- Parameters:
t
- the objecttime
- the time
-
-
Method Detail
-
getObject
public T getObject()
Returns the object.- Returns:
- the object
-
getTime
public double getTime()
Returns the time.- Returns:
- the time
-
compareTo
public int compareTo(Occurrence<T> other)
- Specified by:
compareTo
in interfacejava.lang.Comparable<T>
-
-