public abstract class AbstractFeatureMap<T> extends java.lang.Object implements IFeatureMap<T>
Constructor and Description |
---|
AbstractFeatureMap(java.lang.String requestSlotName,
java.lang.String crPropertyName) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
addInformation(IIdentifier identifier,
T data) |
void |
addListener(IFeatureMapListener listener,
java.util.concurrent.Executor executor) |
void |
afferentObjectAdded(IAfferentObject object) |
void |
afferentObjectRemoved(IAfferentObject object) |
void |
afferentObjectUpdated(IAfferentObject object,
IObjectDelta delta) |
void |
clear() |
protected abstract void |
clearInternal() |
protected void |
dispatch(FeatureMapEvent event) |
void |
dispose() |
protected abstract T |
extractInformation(IAfferentObject afferentObject) |
void |
fillSlotValues(ChunkTypeRequest mutableRequest,
IIdentifier identifier,
IChunk encodedChunk,
ChunkTypeRequest originalSearchRequest)
fill the slot values accordingly for this identifier at the mutablePattern
location this is then used to further specify the actual location
chunk that will be returned
|
void |
getCandidateRealObjects(ChunkTypeRequest request,
java.util.Set<IIdentifier> container)
return all the identifiers of all possible objects that can exist at the
visual location defined by this search pattern if nothing is available, and
empty collection is to be returned
|
protected abstract void |
getCandidates(ChunkTypeRequest request,
java.util.Set<IIdentifier> results) |
protected abstract T |
getCurrentValue(IIdentifier identifier) |
T |
getInformation(IIdentifier identifier)
returns the feature value for this object
|
protected java.util.concurrent.locks.Lock |
getLock() |
IPerceptualMemory |
getPerceptualMemory() |
protected java.lang.String |
getRelevantPropertyName() |
protected java.lang.String |
getRelevantSlotName() |
protected boolean |
hasListeners() |
boolean |
isInterestedIn(ChunkTypeRequest request)
is
getRelevantSlotName() is not null, this will check to see if
the request contains that slot name. |
protected void |
objectAdded(IAfferentObject object,
T data)
call back after object information has been added, assuming data was not
null
|
protected void |
objectRemoved(IAfferentObject object,
T data)
callback
|
protected void |
objectUpdated(IAfferentObject object,
T oldData,
T newData) |
protected abstract T |
removeInformation(IIdentifier identifier) |
void |
removeListener(IFeatureMapListener listener) |
void |
setPerceptualMemory(IPerceptualMemory memory) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
normalizeRequest
isInterestedIn
public AbstractFeatureMap(java.lang.String requestSlotName, java.lang.String crPropertyName)
protected java.lang.String getRelevantSlotName()
protected java.lang.String getRelevantPropertyName()
public void addListener(IFeatureMapListener listener, java.util.concurrent.Executor executor)
addListener
in interface IFeatureMap<T>
public void removeListener(IFeatureMapListener listener)
removeListener
in interface IFeatureMap<T>
protected boolean hasListeners()
protected void dispatch(FeatureMapEvent event)
public void setPerceptualMemory(IPerceptualMemory memory)
setPerceptualMemory
in interface IFeatureMap<T>
public IPerceptualMemory getPerceptualMemory()
getPerceptualMemory
in interface IFeatureMap<T>
protected java.util.concurrent.locks.Lock getLock()
protected abstract void clearInternal()
public final void clear()
clear
in interface IFeatureMap<T>
public void dispose()
dispose
in interface IFeatureMap<T>
public void fillSlotValues(ChunkTypeRequest mutableRequest, IIdentifier identifier, IChunk encodedChunk, ChunkTypeRequest originalSearchRequest)
IFeatureMap
fillSlotValues
in interface IFeatureMap<T>
mutableRequest
- the pseudo visual location to be setupencodedChunk
- TODOpublic final T getInformation(IIdentifier identifier)
IFeatureMap
getInformation
in interface IFeatureMap<T>
public final void getCandidateRealObjects(ChunkTypeRequest request, java.util.Set<IIdentifier> container)
IFeatureMap
getCandidateRealObjects
in interface IFeatureMap<T>
public boolean isInterestedIn(ChunkTypeRequest request)
getRelevantSlotName()
is not null, this will check to see if
the request contains that slot name.isInterestedIn
in interface IFeatureMap<T>
request
- IFeatureMap.isInterestedIn(org.jactr.core.production.request.ChunkTypeRequest)
public final void afferentObjectAdded(IAfferentObject object)
afferentObjectAdded
in interface IAfferentObjectListener
protected void objectAdded(IAfferentObject object, T data)
object
- data
- public final void afferentObjectRemoved(IAfferentObject object)
afferentObjectRemoved
in interface IAfferentObjectListener
protected void objectRemoved(IAfferentObject object, T data)
object
- data
- public final void afferentObjectUpdated(IAfferentObject object, IObjectDelta delta)
afferentObjectUpdated
in interface IAfferentObjectListener
protected void objectUpdated(IAfferentObject object, T oldData, T newData)
protected abstract T getCurrentValue(IIdentifier identifier)
protected abstract T extractInformation(IAfferentObject afferentObject)
protected abstract T removeInformation(IIdentifier identifier)
protected abstract void addInformation(IIdentifier identifier, T data)
protected abstract void getCandidates(ChunkTypeRequest request, java.util.Set<IIdentifier> results)