Generalized common functionality of different Memories to new interface
[Mograsim.git] / net.mograsim.machine / src / net / mograsim / machine / Memory.java
1 package net.mograsim.machine;
2
3 public interface Memory<T>
4 {
5         /**
6          * @param address The address of the desired data. Must be non-negative
7          * @return The data at the requested address
8          * 
9          * @throws IndexOutOfBoundsException
10          */
11         public T getCell(long address);
12         
13         /**
14          * Sets the data at the supplied address
15          * @throws IndexOutOfBoundsException
16          */
17         public void setCell(long address, T data);
18         
19         public long size();
20 }