public class BasicThought extends java.lang.Object implements Thought
Constructor and Description |
---|
BasicThought()
Create a new thought.
|
Modifier and Type | Method and Description |
---|---|
void |
awake()
Perform any initialization required on startup.
|
Bot |
getBot()
Return the associated Bot instance.
|
java.lang.String |
getName()
Return the name that identifies the thought.
|
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.
|
boolean |
isCritical()
Return if this thought must run even under stress.
|
boolean |
isEnabled() |
boolean |
isStopped() |
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 |
migrateProperties()
Migrate to new properties system.
|
void |
pool()
Reset state when instance is pooled.
|
void |
saveProperties() |
void |
setBot(Bot bot)
Set the associated Bot instance.
|
void |
setEnabled(boolean isEnabled) |
void |
setName(java.lang.String name)
Set the name that identifies the thought.
|
void |
setStopped(boolean isStopped) |
void |
stop()
Stop analysing network.
|
void |
think()
Analyse and extend the network.
|
java.lang.String |
toString() |
public void pool()
public java.lang.String getName()
public void setName(java.lang.String name)
public void awake()
public Network getShortTermMemory()
public void log(java.lang.String message, java.util.logging.Level level, java.lang.Object... arguments)
public void log(java.lang.Throwable exception)
public java.lang.String toString()
toString
in class java.lang.Object
public Bot getBot()
public Primitive getPrimitive()
Thought
getPrimitive
in interface Thought
public void setBot(Bot bot)
public void initialize(java.util.Map<java.lang.String,java.lang.Object> properties)
initialize
in interface Thought
public boolean isConscious()
isConscious
in interface Thought
public boolean isCritical()
isCritical
in interface Thought
public boolean isEnabled()
public void setEnabled(boolean isEnabled)
public void setStopped(boolean isStopped)
public void saveProperties()
saveProperties
in interface Thought
public void migrateProperties()
migrateProperties
in interface Thought