DelaySim
Class Entry

java.lang.Object
  extended by DelaySim.Entry
All Implemented Interfaces:
java.lang.Comparable<Entry>

public class Entry
extends java.lang.Object
implements java.lang.Comparable<Entry>

A class describing entries in the scheduling lists of the simulation algorithms. An entry is described by the time of the associated event, and the index of the reaction involved in the event.


Field Summary
 int idx
          reaction involved in the event
 double time
          time of the event
 
Constructor Summary
Entry(double time, int reaction)
          Create an event-object happening at time 'time' and involving reaction 'reaction'
 
Method Summary
 int compareTo(Entry o)
          compare two Entry objects on their 'time' value
 java.lang.String toString()
          Return a string representation of this event
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

time

public double time
time of the event


idx

public int idx
reaction involved in the event

Constructor Detail

Entry

public Entry(double time,
             int reaction)
Create an event-object happening at time 'time' and involving reaction 'reaction'

Parameters:
time - the time of the event
reaction - the reaction involved
Method Detail

compareTo

public int compareTo(Entry o)
compare two Entry objects on their 'time' value

Specified by:
compareTo in interface java.lang.Comparable<Entry>

toString

public java.lang.String toString()
Return a string representation of this event

Overrides:
toString in class java.lang.Object