1 package net.mograsim.machine;
3 public interface Memory<T>
6 * @param address The address of the desired data. Must be non-negative
7 * @return The data at the requested address
9 * @throws IndexOutOfBoundsException
11 public T getCell(long address);
14 * Sets the data at the supplied address
15 * @throws IndexOutOfBoundsException
17 public void setCell(long address, T data);
22 * Registers an observer to be notified when a memory cell is modified
24 public void registerObserver(MemoryObserver ob);
26 public void deregisterObserver(MemoryObserver ob);
28 public void notifyObservers(long address);