|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--Speicher.MemoryArea
This class simulates a memory area in the memory structure and provides methods to handle the memory area.
| Field Summary | |
private java.awt.Color |
color
Color of this memory area for drawing. |
static int |
INIT_PROCESSNR
Initial value for the processNr of a new memory area. |
static int |
INIT_SIZE
Initial value for the size of a new memory area. |
static int |
INIT_STARTPOS
Initial value for the starting position of a new memory area. |
private int |
processNumber
Number of the process to which this memory area belongs. |
private int |
size
Size of this memory area in MB. |
private int |
startPos
Starting position of the area where it is located. |
private int |
usedSize
Really Used size of this memory area in MB. |
| Constructor Summary | |
MemoryArea()
Creates a new memory area with initial values. |
|
MemoryArea(java.awt.Color col)
Creates a new memory area with initial values. |
|
MemoryArea(int newStartPos,
int newSize)
Creates a new memory area with given values. |
|
MemoryArea(int newStartPos,
int newSize,
java.awt.Color col)
Creates a new memory area with given values. |
|
| Method Summary | |
MemoryArea |
deepCopy()
Returns a deep copy of the memory area, all elements are new created. |
java.awt.Color |
getColor()
Returns the drawing color of this memory area. |
int |
getProcessNumber()
Returns the process number to which this memory area belongs. |
int |
getSize()
Returns the size of this memory area. |
int |
getStartPos()
Returns the startting position of this memory area. |
int |
getUsedSize()
Returns the usedSize of this memory area. |
boolean |
isInitial()
Returns true, if values of this memory area are initial. |
void |
setColor(java.awt.Color col)
Sets the drawing color of this memory area. |
void |
setProcessNumber(int newProcessNumber)
Sets the process number to which this memory area belongs to. |
void |
setSize(int newSizeKB)
Sets the size of this memory area. |
void |
setStartPos(int newStartPosKB)
Sets the staringPos of this memory area in MB. |
void |
setUsedSize(int newSizeKB)
Sets the usedSize of this memory area. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private int startPos
private int size
private int usedSize
private java.awt.Color color
private int processNumber
public static final int INIT_STARTPOS
public static final int INIT_SIZE
public static final int INIT_PROCESSNR
| Constructor Detail |
public MemoryArea()
public MemoryArea(java.awt.Color col)
public MemoryArea(int newStartPos,
int newSize)
public MemoryArea(int newStartPos,
int newSize,
java.awt.Color col)
| Method Detail |
public int getStartPos()
public int getSize()
public int getUsedSize()
public MemoryArea deepCopy()
public int getProcessNumber()
public java.awt.Color getColor()
public boolean isInitial()
public void setStartPos(int newStartPosKB)
public void setColor(java.awt.Color col)
public void setProcessNumber(int newProcessNumber)
public void setSize(int newSizeKB)
public void setUsedSize(int newSizeKB)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||