public class ParallelPlan extends AbstractPlan
Constructor and Description |
---|
ParallelPlan()
Creates a new empty parallel plan.
|
ParallelPlan(Plan other)
Creates a new parallel plan from an other.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<BitOp> |
actions()
Returns the list of actions contained in the plan in the ordering of their time specifiers.
|
boolean |
add(int time,
BitOp action)
Adds an action at a specified time specifier in the plan.
|
void |
clear()
Removes all the actions of the plan.
|
boolean |
contains(int time,
BitOp action)
Returns if an action is contained in the plan at a specified time specifier.
|
boolean |
equals(java.lang.Object obj)
Returns if the plan is equal to an other object.
|
java.util.Set<BitOp> |
getActionSet(int time)
Returns the set of actions at a specified time specifier.
|
int |
hashCode()
Returns the hash code of this plan.
|
protected boolean |
isTimeSpecifierOutOfBound(int time)
Returns if a specified time specifier is invalid.
|
double |
makespan()
Returns the makespan of the plan.
|
boolean |
remove(int time)
Removes all the actions at a specified time specifier of the plan.
|
boolean |
remove(int time,
BitOp action)
Removes an action at a specified time specifier of the plan.
|
java.util.Set<java.lang.Integer> |
timeSpecifiers()
Returns the ordered set of time specifiers used in this plan.
|
cost, isEmpty, size
public ParallelPlan()
AbstractPlan.AbstractPlan()
public ParallelPlan(Plan other)
other
- the other plan.AbstractPlan.AbstractPlan(Plan)
public final double makespan()
Plan.makespan()
public java.util.Set<java.lang.Integer> timeSpecifiers()
Plan.timeSpecifiers()
public final java.util.List<BitOp> actions()
Plan.actions()
public final java.util.Set<BitOp> getActionSet(int time)
time
- the time specifier.Plan.getActionSet(int)
public final boolean add(int time, BitOp action)
action
- the action to add.time
- the time specifier of the action in the plan.true
if the action was added; false
otherwise.Plan.add(int, BitOp)
public final boolean remove(int time, BitOp action)
action
- the action to remove.time
- the time specifier of the action in the plan to remove.true
if the action was removed; false
otherwise.Plan.remove(int, BitOp)
public final boolean remove(int time)
time
- the time specifier of the actions in the plan to remove.true
if the action was removed; false
otherwise.Plan.remove(int)
public final boolean contains(int time, BitOp action)
time
- the time specifier.action
- the action.true
if the specified action is contained in the plan at the specified time specifier;
false
otherwise.Plan.contains(int, BitOp)
public final void clear()
Plan.clear()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object to be compared.true
if this plan is equal to the specified object; false
otherwise.AbstractCodedOp.equals(Object)
,
Object.equals(Object)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
protected final boolean isTimeSpecifierOutOfBound(int time)
time
- the time stamp.true
if the specified time specifier is out of bound; false
otherwise.