nars.entity
Class Task

java.lang.Object
  extended by nars.entity.BudgetValue
      extended by nars.entity.Item
          extended by nars.entity.Task
All Implemented Interfaces:
java.lang.Cloneable

public class Task
extends Item

A task to be processed, consists of a Sentence and a BudgetValue


Field Summary
private  Sentence sentence
          The sentence of the Task
protected  boolean structual
          Whether it is derived by a structual rule
 
Fields inherited from class nars.entity.Item
key
 
Fields inherited from class nars.entity.BudgetValue
durability, priority, quality
 
Constructor Summary
Task(Sentence s, BudgetValue b)
          Constructor
 
Method Summary
 Term getContent()
          Directly get the content of the sentence
 Sentence getSentence()
          Get the sentence
 TemporalValue getTense()
          Directly get the tense of the sentence
 boolean isStructual()
          Check if a Task is derived by a StructuralRule
 void merge(Item that)
          Merge one Task into another
 void setStructual()
          Record if a Task is derived by a StructuralRule
 java.lang.String toString()
          Get a String representation of the Task
 java.lang.String toString2()
          Get a String representation of the Task, with reduced accuracy
 
Methods inherited from class nars.entity.Item
getBudget, getKey
 
Methods inherited from class nars.entity.BudgetValue
aboveThreshold, clone, decDurability, decPriority, decQuality, getDurability, getPriority, getQuality, incDurability, incPriority, incQuality, merge, setDurability, setPriority, setQuality, summary
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sentence

private Sentence sentence
The sentence of the Task


structual

protected boolean structual
Whether it is derived by a structual rule

Constructor Detail

Task

public Task(Sentence s,
            BudgetValue b)
Constructor

Parameters:
s - The sentence
b - The budget
Method Detail

getSentence

public Sentence getSentence()
Get the sentence

Returns:
The sentence

getContent

public Term getContent()
Directly get the content of the sentence

Returns:
The content of the sentence

getTense

public TemporalValue getTense()
Directly get the tense of the sentence

Returns:
The tense of the sentence

isStructual

public boolean isStructual()
Check if a Task is derived by a StructuralRule

Returns:
Whether the Task is derived by a StructuralRule

setStructual

public void setStructual()
Record if a Task is derived by a StructuralRule


merge

public void merge(Item that)
Merge one Task into another

Parameters:
that - The other Task

toString

public java.lang.String toString()
Get a String representation of the Task

Overrides:
toString in class BudgetValue
Returns:
The Task as a String

toString2

public java.lang.String toString2()
Get a String representation of the Task, with reduced accuracy

Overrides:
toString2 in class BudgetValue
Returns:
The Task as a String, with 2-digit accuracy for the values