public class Dependencies
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Dependencies.State
Definition of all possible task execution states.
|
Modifier | Constructor and Description |
---|---|
protected |
Dependencies()
Creates a new instance of the dependencies container.
|
Modifier and Type | Method and Description |
---|---|
void |
addRequestedTask(Task requestedTask)
Adds a new requesting task into the internal container.
|
void |
addRequestingTask(Task requestingTask)
Adds a new requesting task into the internal container.
|
Dependencies.State |
getExecutionState()
Returns the current value of the the execution state.
|
java.util.List<Task> |
getRequestedTasks()
Returns the set of tasks requested by this task.
|
Task |
getRequestingTask()
Fetches some requesting task from the internal container.
|
java.util.List<Task> |
getRequestingTasks()
Returns the set of tasks that have requested execution of this task.
|
boolean |
hasNoRequestedTasks()
Detects whether there are not requested tasks.
|
boolean |
hasRequestedTasks()
Detects whether the task has at least one requested task.
|
boolean |
hasRequestingTasks()
Detects whether the task has at least one requesting task.
|
boolean |
hasStateActivated()
Detects whether the execution state is currently activated.
|
boolean |
hasStateDisabled()
Detects whether the execution state is currently disabled.
|
void |
removeRequestedTask(Task requestedTask)
Removes the requested task from the internal container.
|
void |
removeRequestingTask(Task requestingTask)
Removes the requesting task from the internal container.
|
void |
setExecutionState(Dependencies.State newState)
Sets a new value of the execution state of the task.
|
protected Dependencies()
public Dependencies.State getExecutionState()
public boolean hasStateActivated()
true
if the task is currently activated.public boolean hasStateDisabled()
true
if the task is currently disabled.public void setExecutionState(Dependencies.State newState)
newState
- New value of the task execution state.public java.util.List<Task> getRequestingTasks()
public Task getRequestingTask()
public void addRequestingTask(Task requestingTask)
requestingTask
- Reference to the task to be added.public void removeRequestingTask(Task requestingTask)
requestingTask
- Reference to the task to be removed.public boolean hasRequestingTasks()
true
if there exists some requesting tasks.public java.util.List<Task> getRequestedTasks()
public void addRequestedTask(Task requestedTask)
requestedTask
- Reference to the task to be added.public void removeRequestedTask(Task requestedTask)
requestedTask
- Reference to the task to be removed.public boolean hasRequestedTasks()
true
if there exists some requested tasks.public boolean hasNoRequestedTasks()
true
if there exist no requested tasks.