jmdp.basic
Class EventArray

java.lang.Object
  extended by jmdp.basic.Event
      extended by jmdp.basic.EventArray
All Implemented Interfaces:
java.lang.Comparable<Event>

public abstract class EventArray
extends Event

This class is an easy way to use an event that is represented by an array of int.

Author:
Andres Sarmiento, German Riano - Universidad de Los Andes

Field Summary
protected  int[] status
           
 
Constructor Summary
EventArray(int size)
          Creates a new EventArray with an array of the size indicated filled with zeros.
EventArray(int[] status)
          Builds a new event with characteristic array as a paramenter.
 
Method Summary
 int compareTo(Event e)
           
 int compareTo(EventArray e1)
          Compares the properties in order.
 boolean equals(EventArray e)
           
 int hashCode()
           
 java.lang.String label()
          The user MUST override this method to give a (hopefully short) label for the event.
 
Methods inherited from class jmdp.basic.Event
equals, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

status

protected int[] status
Constructor Detail

EventArray

public EventArray(int[] status)
Builds a new event with characteristic array as a paramenter.

Parameters:
status - characteristic array of the event.

EventArray

public EventArray(int size)
Creates a new EventArray with an array of the size indicated filled with zeros.

Parameters:
size - size of the characteristic array.
Method Detail

label

public java.lang.String label()
Description copied from class: Event
The user MUST override this method to give a (hopefully short) label for the event.

Specified by:
label in class Event
Returns:
short description of the event.

compareTo

public final int compareTo(EventArray e1)
Compares the properties in order.

Parameters:
e1 - The EventArray to compare to.
Returns:
+1, 0 or -1, according to whether this states dominates e1.

compareTo

public final int compareTo(Event e)

equals

public final boolean equals(EventArray e)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object