jmdp.basic
Class Action

java.lang.Object
  extended by jmdp.basic.Action
All Implemented Interfaces:
java.lang.Comparable<Action>
Direct Known Subclasses:
ActionArray

public abstract class Action
extends java.lang.Object
implements java.lang.Comparable<Action>

This class represents a single action. It implements Comparable in order to be easily organized and searched. It is also helpfull when using Sets of Action in order to avoid repeated items.

Author:
German Riano and Andres Sarmiento - Universidad de Los Andes
See Also:
Comparable, Collection

Constructor Summary
Action()
           
 
Method Summary
 boolean equals(java.lang.Object o)
          This method calls compareTo to check if the Action are equal.
abstract  java.lang.String label()
          The user MUST override this method to give a (hopefully short) label for the state.
 java.lang.String toString()
          This calls label().
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

Action

public Action()
Method Detail

label

public abstract java.lang.String label()
The user MUST override this method to give a (hopefully short) label for the state.

Returns:
short description of the state.

toString

public final java.lang.String toString()
This calls label().

Overrides:
toString in class java.lang.Object

equals

public final boolean equals(java.lang.Object o)
This method calls compareTo to check if the Action are equal.

Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)