jmdp.basic
Class EventArray
java.lang.Object
jmdp.basic.Event
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. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
status
protected int[] status
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.
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