|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jactr.core.chunk.basic.AbstractChunk
public abstract class AbstractChunk
abstract chunk that handles most common logic for the developer.
| Constructor Summary | |
|---|---|
AbstractChunk(IModel model)
|
|
| Method Summary | |
|---|---|
void |
addListener(IChunkListener cl,
java.util.concurrent.Executor executor)
note : non-locking |
void |
addListener(IParameterListener pl,
java.util.concurrent.Executor executor)
note : non-locking |
int |
compareTo(IChunk comparison)
note : non-locking |
void |
dispatch(ChunkEvent chunkEvent)
dispatch an event. |
void |
dispatch(ParameterEvent pEvent)
dispatch parameter event |
void |
dispose()
called when one is sure that this chunk will NEVER be used. |
void |
encode(double when)
note : non-locking |
boolean |
equalsSymbolic(IChunk chunk)
returns true if the symbolic contents of the two chunks are the same, i.e. |
java.lang.String |
getComment()
note : non-locking |
java.lang.Object |
getMetaData(java.lang.String key)
note : non-locking |
java.util.Collection<java.lang.String> |
getMetaDataKeys()
return all the keys |
IModel |
getModel()
get the model that is responsible for this chunk, note: the chunk may not have been encoded yet |
java.util.concurrent.locks.Lock |
getReadLock()
return the read lock for this chunk. |
abstract ISubsymbolicChunk |
getSubsymbolicChunk()
return the subsymbolic portion of the chunk |
abstract ISymbolicChunk |
getSymbolicChunk()
return the symbolic component of the chunk |
java.util.concurrent.locks.Lock |
getWriteLock()
return the read lock for this chunk. |
boolean |
hasBeenDisposed()
note : non-locking |
boolean |
hasListeners()
note : non-locking |
boolean |
hasParameterListeners()
note : non-locking |
boolean |
isA(IChunkType ct)
note : non-locking |
boolean |
isAStrict(IChunkType ct)
note : non-locking |
boolean |
isEncoded()
note : non-locking |
boolean |
isMutable()
note : non-locking |
void |
removeListener(IChunkListener cl)
note : non-locking |
void |
removeListener(IParameterListener pl)
note : non-locking |
void |
replaceContents(IChunk masterChunk)
replace the contents of this chunk with those of masterChunk. |
void |
setComment(java.lang.String comment)
note : non-locking |
void |
setMetaData(java.lang.String key,
java.lang.Object value)
Sets the MetaData attribute of the MetaContainer object |
void |
setMutable(boolean isMutable)
note : non-locking |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractChunk(IModel model)
| Method Detail |
|---|
public IModel getModel()
IChunk
getModel in interface IChunkIChunk.getModel()public void dispatch(ChunkEvent chunkEvent)
IChunk
dispatch in interface IChunkchunkEvent - IChunk.dispatch(org.jactr.core.chunk.event.ChunkEvent)public void dispatch(ParameterEvent pEvent)
IChunk
dispatch in interface IChunkpEvent - IChunk.dispatch(org.jactr.core.event.ParameterEvent)public boolean hasParameterListeners()
hasParameterListeners in interface IChunkIChunk.hasParameterListeners()public boolean hasListeners()
hasListeners in interface IChunkIChunk.hasListeners()
public void addListener(IChunkListener cl,
java.util.concurrent.Executor executor)
addListener in interface IChunkcl - executor - IChunk.addListener(org.jactr.core.chunk.event.IChunkListener,
java.util.concurrent.Executor)
public void addListener(IParameterListener pl,
java.util.concurrent.Executor executor)
addListener in interface IChunkpl - executor - IChunk.addListener(org.jactr.core.event.IParameterListener,
java.util.concurrent.Executor)public void removeListener(IChunkListener cl)
removeListener in interface IChunkcl - IChunk.removeListener(org.jactr.core.chunk.event.IChunkListener)public void removeListener(IParameterListener pl)
removeListener in interface IChunkpl - IChunk.removeListener(org.jactr.core.event.IParameterListener)public abstract ISubsymbolicChunk getSubsymbolicChunk()
IChunk
getSubsymbolicChunk in interface IChunkIChunk.getSubsymbolicChunk()public abstract ISymbolicChunk getSymbolicChunk()
IChunk
getSymbolicChunk in interface IChunkIChunk.getSymbolicChunk()public void replaceContents(IChunk masterChunk)
masterChunk - public int compareTo(IChunk comparison)
compareTo in interface java.lang.Comparable<IChunk>comparison -
Comparable.compareTo(java.lang.Object)public void dispose()
IChunkIDeclarativeModule. To dispose
of a chunk, use IDeclarativeModule.dispose(IChunk) instead
dispose in interface IChunkIChunk.dispose()public boolean hasBeenDisposed()
hasBeenDisposed in interface IChunkIChunk.hasBeenDisposed()public void encode(double when)
encode in interface IChunkwhen - TODOIChunk.encode(double)public boolean isEncoded()
isEncoded in interface IChunkIChunk.isEncoded()public boolean isA(IChunkType ct)
isA in interface IChunkct -
IChunk.isA(org.jactr.core.chunktype.IChunkType)public boolean isAStrict(IChunkType ct)
isAStrict in interface IChunkct -
IChunk.isAStrict(org.jactr.core.chunktype.IChunkType)public void setComment(java.lang.String comment)
setComment in interface Commentablecomment - Commentable.setComment(java.lang.String)public java.lang.String getComment()
getComment in interface CommentableCommentable.getComment()public java.lang.Object getMetaData(java.lang.String key)
getMetaData in interface IMetaContainerkey -
IMetaContainer.getMetaData(java.lang.String)
public void setMetaData(java.lang.String key,
java.lang.Object value)
IMetaContainer
setMetaData in interface IMetaContainerkey - value - IMetaContainer.setMetaData(java.lang.String,
java.lang.Object)public java.util.Collection<java.lang.String> getMetaDataKeys()
IMetaContainer
getMetaDataKeys in interface IMetaContainerIMetaContainer.getMetaDataKeys()public boolean isMutable()
isMutable in interface IChunkIChunk.isMutable()public void setMutable(boolean isMutable)
setMutable in interface IChunkisMutable - IChunk.setMutable(boolean)public boolean equalsSymbolic(IChunk chunk)
IChunk
equalsSymbolic in interface IChunkchunk - cannot be null
IChunk.equalsSymbolic(org.jactr.core.chunk.IChunk)public final java.util.concurrent.locks.Lock getReadLock()
IChunkLock.unlock() is wrapped within the finally clause.
getReadLock in interface IChunkIChunk.getReadLock()public final java.util.concurrent.locks.Lock getWriteLock()
IChunkLock.unlock() is wrapped within the finally clause.
getWriteLock in interface IChunkIChunk.getWriteLock()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||