Type - the memory cell type@ThreadSafe public abstract class AbstractMemoryContext<Type> extends Object implements MemoryContext<Type>
| Modifier and Type | Field and Description |
|---|---|
protected Set<Memory.MemoryListener> |
listeners
List of all memory listeners.
|
| Constructor and Description |
|---|
AbstractMemoryContext() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMemoryListener(Memory.MemoryListener listener)
Adds a listener onto listeners list
|
boolean |
areMemoryNotificationsEnabled()
Determine if notifications of memory changes are globally enabled or disabled.
|
void |
notifyMemoryChanged(int position)
Notify all listeners that memory has changed.
|
void |
notifyMemorySizeChanged()
Notify listeners that memory size has changed.
|
void |
removeMemoryListener(Memory.MemoryListener listener)
Removes the listener from listeners list
|
void |
setMemoryNotificationsEnabled(boolean enabled)
Enable/disable notifications of memory changes globally.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclear, getDataType, getSize, read, readWord, write, writeWordprotected final Set<Memory.MemoryListener> listeners
public boolean areMemoryNotificationsEnabled()
MemoryContextareMemoryNotificationsEnabled in interface MemoryContext<Type>public void setMemoryNotificationsEnabled(boolean enabled)
MemoryContextsetMemoryNotificationsEnabled in interface MemoryContext<Type>enabled - - true if enabled, false if disabled.public void addMemoryListener(Memory.MemoryListener listener)
addMemoryListener in interface MemoryContext<Type>listener - listener objectpublic void removeMemoryListener(Memory.MemoryListener listener)
removeMemoryListener in interface MemoryContext<Type>listener - listener objectpublic void notifyMemoryChanged(int position)
position - memory position (address) on which the value has changedpublic void notifyMemorySizeChanged()
Copyright © 2017. All rights reserved.