org.pandora.thought
Class BasicThought

java.lang.Object
  extended by org.pandora.thought.BasicThought
All Implemented Interfaces:
Thought
Direct Known Subclasses:
Consciousness, Forgetfulness, Inference, Language, SubconsciousThought

public class BasicThought
extends java.lang.Object
implements Thought

Something that given a network of objects can perform some function.


Constructor Summary
BasicThought()
          Create a new thought.
 
Method Summary
 void awake()
          Perform any initialization required on startup.
 java.lang.String getName()
          Return the name that identifies the thought.
 Pandora getPandora()
          Return the associated Pandora instance.
 Primitive getPrimitive()
          Return the primitive representation of the thought.
 Network getShortTermMemory()
          Return the short term memory.
 void initialize(java.util.Map<java.lang.String,java.lang.Object> properties)
          Initialize any configurable settings from the properties.
 boolean isConscious()
          Thoughts can be conscious or sub-conscious.
 void log(java.lang.String message, java.util.logging.Level level, java.lang.Object... arguments)
          Log the message if the debug level is greater or equal to the level.
 void log(java.lang.Throwable exception)
          Log the exception.
 void setName(java.lang.String name)
          Set the name that identifies the thought.
 void setPandora(Pandora pandora)
          Set the associated Pandora instance.
 void stop()
          Stop analysing network.
 void think()
          Analyse and extend the network.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicThought

public BasicThought()
Create a new thought.

Method Detail

getName

public java.lang.String getName()
Return the name that identifies the thought.

Specified by:
getName in interface Thought

setName

public void setName(java.lang.String name)
Set the name that identifies the thought.

Specified by:
setName in interface Thought

stop

public void stop()
Stop analysing network.

Specified by:
stop in interface Thought

think

public void think()
Analyse and extend the network.

Specified by:
think in interface Thought

awake

public void awake()
Perform any initialization required on startup.

Specified by:
awake in interface Thought

getShortTermMemory

public Network getShortTermMemory()
Return the short term memory.


log

public void log(java.lang.String message,
                java.util.logging.Level level,
                java.lang.Object... arguments)
Log the message if the debug level is greater or equal to the level.


log

public void log(java.lang.Throwable exception)
Log the exception.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getPandora

public Pandora getPandora()
Return the associated Pandora instance.

Specified by:
getPandora in interface Thought

getPrimitive

public Primitive getPrimitive()
Description copied from interface: Thought
Return the primitive representation of the thought.

Specified by:
getPrimitive in interface Thought

setPandora

public void setPandora(Pandora pandora)
Set the associated Pandora instance.

Specified by:
setPandora in interface Thought

initialize

public void initialize(java.util.Map<java.lang.String,java.lang.Object> properties)
Initialize any configurable settings from the properties.

Specified by:
initialize in interface Thought

isConscious

public boolean isConscious()
Thoughts can be conscious or sub-conscious. A conscious thought is run by the mind single threaded with exclusive access to the short term memory. A sub-conscious thought is run concurrently, and must run in its own memory space.

Specified by:
isConscious in interface Thought