org.jactr.core.production.condition
Class ChunkCondition
java.lang.Object
org.jactr.core.production.condition.AbstractSlotCondition
org.jactr.core.production.condition.AbstractBufferCondition
org.jactr.core.production.condition.ChunkTypeCondition
org.jactr.core.production.condition.ChunkCondition
- All Implemented Interfaces:
- IBufferCondition, ICondition, ISlotContainer
public class ChunkCondition
- extends ChunkTypeCondition
match the specifics of a chunk in a named buffer
- Author:
- harrison
|
Method Summary |
int |
bind(IModel model,
java.util.Map<java.lang.String,java.lang.Object> variableBindings,
boolean isIterative)
bind and create a new ChunkCondition with the variables fully resolved |
ChunkCondition |
clone(IModel model,
java.util.Map<java.lang.String,java.lang.Object> bindings)
attempt to clone this condition before it will be bound in the
instantiation phase. |
IChunk |
getChunk()
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jactr.core.production.condition.ICondition |
dispose |
ChunkCondition
public ChunkCondition(java.lang.String bufferName,
IChunk chunk)
ChunkCondition
public ChunkCondition(java.lang.String bufferName,
IChunk chunk,
java.util.Collection<? extends ISlot> slots)
- Parameters:
bufferName -
getChunk
public IChunk getChunk()
- See Also:
org.jactr.core.utils.Duplicateable#duplicate()
clone
public ChunkCondition clone(IModel model,
java.util.Map<java.lang.String,java.lang.Object> bindings)
throws CannotMatchException
- Description copied from interface:
ICondition
- attempt to clone this condition before it will be bound in the
instantiation phase. We pass the current bindings so that the condition can
do an early rejection if possible.
- Specified by:
clone in interface ICondition- Overrides:
clone in class ChunkTypeCondition
- Returns:
- a writable copy of the condition that will be bound
- Throws:
CannotMatchException - if there is no way this condition can be matched
bind
public int bind(IModel model,
java.util.Map<java.lang.String,java.lang.Object> variableBindings,
boolean isIterative)
throws CannotMatchException
- bind and create a new ChunkCondition with the variables fully resolved
- Specified by:
bind in interface ICondition- Overrides:
bind in class ChunkTypeCondition
- Returns:
- number of unresolved variables
- Throws:
CannotMatchException- See Also:
org.jactr.core.production.condition.ICondition#bind(org.jactr.core.model.IModel,
Map)