Package jsl.simulation
Class ConditionalAction
- java.lang.Object
-
- jsl.simulation.ConditionalAction
-
- All Implemented Interfaces:
java.lang.Comparable<ConditionalAction>
public abstract class ConditionalAction extends java.lang.Object implements java.lang.Comparable<ConditionalAction>
-
-
Constructor Summary
Constructors Constructor Description ConditionalAction()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
action()
int
compareTo(ConditionalAction action)
Returns a negative integer, zero, or a positive integer if this object is less than, equal to, or greater than the specified object.int
getId()
int
getPriority()
abstract boolean
testCondition()
-
-
-
Method Detail
-
testCondition
public abstract boolean testCondition()
-
action
protected abstract void action()
-
getPriority
public final int getPriority()
-
getId
public final int getId()
-
compareTo
public final int compareTo(ConditionalAction action)
Returns a negative integer, zero, or a positive integer if this object is less than, equal to, or greater than the specified object. Natural ordering: time, then priority, then order of creation Lower time, lower priority, lower order of creation goes first Throws ClassCastException if the specified object's type prevents it from begin compared to this object. Throws RuntimeException if the id's of the objects are the same, but the references are not when compared with equals. Note: This class may have a natural ordering that is inconsistent with equals.- Specified by:
compareTo
in interfacejava.lang.Comparable<ConditionalAction>
- Parameters:
action
- The action to compare- Returns:
- Returns a negative integer, zero, or a positive integer if this object is less than, equal to, or greater than the specified object.
-
-