|
Cytoscape 3.0.1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cytoscape.work.TaskIterator
public final class TaskIterator
A TaskIterator provides the functionality of sequencing Tasks. Tasks provided by TaskIterator
can be executed by calling a TaskManager's execute() method.
| Constructor Summary | |
|---|---|
TaskIterator(int expectedNumTasks,
Task... initialTasks)
Constructs an iterator that will yield Tasks in the order that they were passed into this constructor. |
|
TaskIterator(Task... initialTasks)
Constructs an iterator that will yield Tasks in the order that they were passed into this constructor. |
|
| Method Summary | |
|---|---|
void |
append(Task task)
Adds the given task to the end of this iterator. |
void |
append(TaskIterator taskIterator)
Adds the tasks in the given TaskIterator to the end of this iterator. |
int |
getNumTasks()
Returns the current total number of tasks in the iterator. |
boolean |
hasNext()
Returns true if a call to next() would return another Task, otherwise false. |
void |
insertTasksAfter(Task referenceTask,
Task... newTasks)
Inserts "newTasks" immediately after "referenceTask". |
void |
insertTasksAfter(Task referenceTask,
TaskIterator newTasks)
Inserts "newTasks" immediately after "referenceTask". |
Task |
next()
Returns the next Task in order if the TaskIterator can still yield more Tasks, otherwise throws an exception. |
void |
remove()
Unsupported -> always throws an exception! |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TaskIterator(int expectedNumTasks,
Task... initialTasks)
expectedNumTasks - The total number of tasks that the initialTasks are likely to spawn.initialTasks - the Tasks to place into the iterator.public TaskIterator(Task... initialTasks)
initialTasks - the Tasks to place into the iterator.| Method Detail |
|---|
public void insertTasksAfter(Task referenceTask,
Task... newTasks)
throws IllegalStateException
referenceTask - task to insert newTasks after.newTasks - tasks to insert after referenceTask.
IllegalStateException - if "referenceTask" is not known to the iterator.
public void insertTasksAfter(Task referenceTask,
TaskIterator newTasks)
throws IllegalStateException
referenceTask - the Task to insert "newTasks" after.newTasks - the TaskIterator the tasks to insert.
IllegalStateException - if "referenceTask" is not known to the iterator.public boolean hasNext()
hasNext in interface Iterator<Task>public Task next()
next in interface Iterator<Task>public void remove()
remove in interface Iterator<Task>UnsupportedOperationExceptionpublic int getNumTasks()
public void append(Task task)
task - task to insertpublic void append(TaskIterator taskIterator)
taskIterator - the tasks to insert
|
Cytoscape 3.0.1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||