|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.computing.ai.planning.CompileTimeObject
org.jscience.computing.ai.planning.TaskList
public class TaskList
Each task list, both at compile time and at run time, is an instance of this class.
| Field Summary | |
|---|---|
static TaskList |
empty
This variable represents an empty task list. |
TaskList[] |
subtasks
In case this task list is not-atomic, this array represents it. |
| Constructor Summary | |
|---|---|
TaskList(int size,
boolean orderedIn)
To initialize this task list as a non-atomic one. |
|
TaskList(TaskAtom taskIn)
To initialize this task list as an atomic one. |
|
| Method Summary | |
|---|---|
TaskList |
bind(Term[] binding)
To bind a task list to a given binding. |
static TaskList |
createTaskList(java.util.Vector subtasksIn,
boolean orderedIn)
To create a non-atomic task list. |
java.util.LinkedList |
getFirst()
To return a LinkedList of the task atoms we have
the option to achieve right now. |
java.lang.String |
getInitCode(java.lang.String what)
This function produces Java code used to create this task list either as an atomic task list or recursively, as a list of other task lists. |
TaskAtom |
getTask()
To return the task atom associated with this task list. |
boolean |
isEmpty()
Whether or not this task list is, or has become as result of task decomposition, an empty one. |
void |
print()
This function is used to print this task list. |
void |
replace(TaskList tasksIn)
This function replaces (i.e., decomposes) a given task atom with a task list. |
void |
setVarCount(int varCountIn)
This function sets the number of variables for this task list. |
java.lang.String |
toCode()
This function produces Java code to create this task list. |
java.lang.String |
toString()
This function returns a printable String
representation of this task list. |
void |
undo()
This function undoes the decomposition of a task atom to a task list in case of a backtrack over the decision to decompose the task. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static TaskList empty
public TaskList[] subtasks
null.
| Constructor Detail |
|---|
public TaskList(TaskAtom taskIn)
taskIn - the task atom this task list will represent.
public TaskList(int size,
boolean orderedIn)
size - the number of task lists in the task list this object
represents.orderedIn - whether or not this task list is ordered.| Method Detail |
|---|
public TaskList bind(Term[] binding)
binding - the given binding
public static TaskList createTaskList(java.util.Vector subtasksIn,
boolean orderedIn)
TaskList.empty if the required task list is of length 0
rather than creating a new empty task list. Other than that, this
function acts like a constructor.
subtasksIn - a Vector of subtasks the output task list
will represent.orderedIn - whether or not the output task list should be ordered.
public java.util.LinkedList getFirst()
LinkedList of the task atoms we have
the option to achieve right now. This list might have more than one
member because of the existence of unordered task lists.
LinkedList of the task atoms we have the option
to achieve right now.public java.lang.String getInitCode(java.lang.String what)
what - the String name of the task list created by
this piece of code.
String.public TaskAtom getTask()
null otherwise.public boolean isEmpty()
true if this task list is equivalent to an empty
task list, false otherwise.public void print()
public void replace(TaskList tasksIn)
tasksIn - the decomposition to replace the task atom.public void setVarCount(int varCountIn)
varCountIn - the number of variables for this task list.public java.lang.String toCode()
toCode in class CompileTimeObjectpublic java.lang.String toString()
String
representation of this task list.
toString in class java.lang.ObjectString representation.public void undo()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||