nars.entity
Class Item

java.lang.Object
  extended by nars.entity.BudgetValue
      extended by nars.entity.Item
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
Concept, Task, TermLink

public abstract class Item
extends BudgetValue

An item is an object that can be put into a Bag, to participate in the resource competation of the system.

It has a key and a budget.


Field Summary
protected  java.lang.String key
          The key of the Item, unique in a Bag
 
Fields inherited from class nars.entity.BudgetValue
durability, priority, quality
 
Constructor Summary
protected Item()
          Default constructor
protected Item(BudgetValue v)
          Constructor with initial budget
 
Method Summary
 BudgetValue getBudget()
          Get current BudgetValue
 java.lang.String getKey()
          Get the current key
 
Methods inherited from class nars.entity.BudgetValue
aboveThreshold, clone, decDurability, decPriority, decQuality, getDurability, getPriority, getQuality, incDurability, incPriority, incQuality, merge, setDurability, setPriority, setQuality, summary, toString, toString2
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

key

protected java.lang.String key
The key of the Item, unique in a Bag

Constructor Detail

Item

protected Item()
Default constructor


Item

protected Item(BudgetValue v)
Constructor with initial budget

Parameters:
v - The initial budget
Method Detail

getKey

public java.lang.String getKey()
Get the current key

Returns:
Current key value

getBudget

public BudgetValue getBudget()
Get current BudgetValue

This method is redundant, just to make the code more readable

Returns:
Current BudgetValue