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.Objectpublic Bot getBot()
public Primitive getPrimitive()
ThoughtgetPrimitive in interface Thoughtpublic void setBot(Bot bot)
public void initialize(java.util.Map<java.lang.String,java.lang.Object> properties)
initialize in interface Thoughtpublic boolean isConscious()
isConscious in interface Thoughtpublic boolean isCritical()
isCritical in interface Thoughtpublic boolean isEnabled()
public void setEnabled(boolean isEnabled)
public void setStopped(boolean isStopped)
public void saveProperties()
saveProperties in interface Thoughtpublic void migrateProperties()
migrateProperties in interface Thought