Serializable
public class Task<T extends Term> extends Item<Sentence<T>> implements Serializable
Modifier and Type | Class | Description |
---|---|---|
static class |
Task.EnumType |
Item.ItemPriorityComparator<E extends Item>, Item.StringKeyItem
Modifier and Type | Field | Description |
---|---|---|
private Sentence |
bestSolution |
|
private boolean |
isInput |
|
Sentence |
parentBelief |
|
private boolean |
partOfSequenceBuffer |
|
Sentence<T> |
sentence |
Constructor | Description |
---|---|
Task(Sentence<T> s,
BudgetValue b,
Sentence parentBelief) |
Constructors for double premise derived task
|
Task(Sentence<T> s,
BudgetValue b,
Sentence parentBelief,
Sentence solution) |
Constructors for solved double premise derived task
|
Task(Sentence<T> s,
BudgetValue b,
Task.EnumType type) |
Constructor for input task and single premise derived task
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
aboveThreshold() |
|
boolean |
equals(Object obj) |
|
Sentence |
getBestSolution() |
Get the best-so-far solution for a Question or Goal
|
long |
getCreationTime() |
Directly get the creation time of the sentence
|
Sentence |
getParentBelief() |
Get the parent belief of a task
|
T |
getTerm() |
|
int |
hashCode() |
|
boolean |
isElemOfSequenceBuffer() |
|
boolean |
isInput() |
Check if a Task is a direct input
|
Item |
merge(Item that) |
Merge one Task into another
|
Sentence |
name() |
Get the current key
|
void |
setBestSolution(Memory memory,
Sentence judg,
Timable time) |
Set the best-so-far solution for a Question or Goal, and report answer
for input question
|
void |
setElemOfSequenceBuffer(boolean b) |
flag to indicate whether this Event Task participates in tempporal induction
|
String |
toStringLong() |
Get a String representation of the Task
|
decDurability, decPriority, getBudget, getDurability, getPriority, getPrioritySum, getQuality, incDurability, incPriority, setDurability, setPriority, setQuality, toString, toStringExternal, toStringExternal2
public final Sentence parentBelief
private Sentence bestSolution
private boolean partOfSequenceBuffer
private boolean isInput
public Task(Sentence<T> s, BudgetValue b, Task.EnumType type)
s
- The sentenceb
- The budgetpublic Task(Sentence<T> s, BudgetValue b, Sentence parentBelief)
s
- The sentenceb
- The budgetparentBelief
- The belief used for deriving the taskpublic Task(Sentence<T> s, BudgetValue b, Sentence parentBelief, Sentence solution)
s
- The sentenceb
- The budgetparentBelief
- The belief used for deriving the tasksolution
- The solution to the taskpublic long getCreationTime()
public boolean isInput()
public boolean aboveThreshold()
public Sentence getBestSolution()
public void setBestSolution(Memory memory, Sentence judg, Timable time)
judg
- The solution to be rememberedpublic Sentence getParentBelief()
public String toStringLong()
toStringLong
in class Item<Sentence<T extends Term>>
public void setElemOfSequenceBuffer(boolean b)
public boolean isElemOfSequenceBuffer()
public T getTerm()
Copyright © 2020 OpenNARS. All rights reserved.