jmarkov
Class Event

java.lang.Object
  extended by jmarkov.Event
All Implemented Interfaces:
java.lang.Comparable

public class Event
extends java.lang.Object
implements java.lang.Comparable

The class Event allows the user to define the implementation of the Events that can alter the States of the Markov Chain.

Author:
German Riaņo.

Constructor Summary
Event()
           
 
Method Summary
 int compareTo(java.lang.Object ev)
          Returns positive if this Event has a higher number then the given event.
 int getNum()
           
 EventsSet getSet()
          Returns the set of Events to which this event belongs.
 java.lang.String toString()
          If this function is not overriden by the user it returns the Event number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Event

public Event()
Method Detail

getSet

public EventsSet getSet()
Returns the set of Events to which this event belongs.

Returns:
the set to which this event belongs.

getNum

public int getNum()
Returns:
The position of the Event in the Events set. Returns -1 if this events has not yet been added to the set.

compareTo

public int compareTo(java.lang.Object ev)
Returns positive if this Event has a higher number then the given event.

Specified by:
compareTo in interface java.lang.Comparable
See Also:
Comparable.compareTo(Object)

toString

public java.lang.String toString()
If this function is not overriden by the user it returns the Event number. It is highly recommended that the user overrides it to give a more descriptive label to be used when reporting the occurrance rates of the events.

Overrides:
toString in class java.lang.Object