|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jactr.core.production.action.DefaultAction
org.jactr.core.production.action.AddAction
public class AddAction
AddAction represents the consequence of adding a chunk to a buffer. It can add an existing chunk to a buffer, add a chunk that is referenced by a variable name, or to create a new chunk in the buffer.
| Constructor Summary | |
|---|---|
AddAction()
default constructor equivalent to AddAction("goal", null) |
|
AddAction(java.lang.String bufferName,
java.lang.Object ref)
|
|
AddAction(java.lang.String bufferName,
java.lang.Object ref,
java.util.Collection<? extends ISlot> slots)
add a chunk (ref) to bufferName buffer |
|
| Method Summary | |
|---|---|
void |
addSlot(ISlot s)
In addition to adding chunks to a buffer, the IChunk?s slot values can be changed at the same time. |
IAction |
bind(java.util.Map<java.lang.String,java.lang.Object> bindings)
Bind is called during the creation of an instantiation of a produciton. |
void |
dispose()
Description of the Method |
double |
fire(IInstantiation instantiation,
double firingTime)
Description of the Method |
java.lang.String |
getBufferName()
return the name of the buffer that the chunk will be added to |
IChunk |
getChunk()
return the chunk to be added if it was specified. |
java.lang.String |
getChunkName()
return the variable name of the chunk if it has been specified, null otherwise |
IChunkType |
getChunkType()
return the chunktype of the to-be created chunk if it has been specified, null otherwise |
java.lang.Object |
getReferant()
Gets the referant attribute of the AddAction object |
java.util.Collection<? extends ISlot> |
getSlots()
Return all the slots that this addaction will attempt to set for the to be added chunk. |
java.util.Collection<ISlot> |
getSlots(java.util.Collection<ISlot> slots)
|
void |
removeSlot(ISlot s)
Remove a specific slot from the addaction. |
void |
setBufferName(java.lang.String name)
override the constructor and set the buffer name |
void |
setChunk(IChunk c)
set the chunk that will be added to the buffer |
void |
setChunkName(java.lang.String name)
set the variable name of the chunk to be added. |
void |
setChunkType(IChunkType ct)
set the chunktype of the chunk to be created |
void |
setReferant(java.lang.Object o)
Sets the referant attribute of the AddAction object |
java.lang.String |
toString()
Description of the Method |
| Methods inherited from class org.jactr.core.production.action.DefaultAction |
|---|
resolve |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AddAction()
public AddAction(java.lang.String bufferName,
java.lang.Object ref,
java.util.Collection<? extends ISlot> slots)
bufferName - name of the buffer to insert intoref - IChunk, IChunkType, chunkName, or variable name
public AddAction(java.lang.String bufferName,
java.lang.Object ref)
| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic void dispose()
dispose in interface IActiondispose in class DefaultActionpublic java.lang.Object getReferant()
public void setReferant(java.lang.Object o)
o - The new referant value
public IAction bind(java.util.Map<java.lang.String,java.lang.Object> bindings)
throws CannotInstantiateException
IAction
bind in interface IActionCannotInstantiateExceptionpublic java.lang.String getBufferName()
getBufferName in interface IBufferActionpublic void setBufferName(java.lang.String name)
setBufferName in interface IBufferActionname - The new bufferName valuepublic void setChunkType(IChunkType ct)
ct - The new chunkType valuepublic void setChunkName(java.lang.String name)
name - The new chunkName valuepublic void setChunk(IChunk c)
c - The new chunk valuepublic java.lang.String getChunkName()
public IChunkType getChunkType()
public IChunk getChunk()
public java.util.Collection<? extends ISlot> getSlots()
getSlots in interface ISlotContainerpublic java.util.Collection<ISlot> getSlots(java.util.Collection<ISlot> slots)
getSlots in interface ISlotContainerpublic void addSlot(ISlot s)
addSlot in interface ISlotContainers - The feature to be added to the ISlot attributepublic void removeSlot(ISlot s)
removeSlot in interface ISlotContainers - Description of Parameter
public double fire(IInstantiation instantiation,
double firingTime)
DefaultAction
fire in interface IActionfire in class DefaultActioninstantiation - Description of the ParameterfiringTime - when this production was fired
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||