Class 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>>
    The Occurrence represents an occurrence or event, e.g., the failure or repair of an object at a given time.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected T t
      The element T.
      protected java.lang.Double time
      The time of the occurrence.
    • Constructor Summary

      Constructors 
      Constructor Description
      Occurrence​(T t, double time)
      Constructs an Occurrence with a given object and the time.
    • Field Detail

      • t

        protected final T t
        The element T.
      • time

        protected final java.lang.Double time
        The time of the occurrence.
    • Constructor Detail

      • Occurrence

        public Occurrence​(T t,
                          double time)
        Constructs an Occurrence with a given object and the time.
        Parameters:
        t - the object
        time - 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 interface java.lang.Comparable<T>