Subversion Repositories Code-Repo

Rev

Rev 96 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
96 Kevin 1
// Individual entries in the linked list
2
public class LinkedListBlock {
3
	private long startAddress;	// Start address of free block
4
	private long endAddress;		// End address of free block
5
	private long size;			// Total size of free block
6
	private LinkedListBlock nextBlock;	// Pointer to next block in list
7
	private LinkedListBlock prevBlock;	// Pointer to previous block in list
8
 
9
	// Constructor
10
	public LinkedListBlock(long start, long end, long size){
11
		this.startAddress = start;
12
		this.endAddress = end;
13
		this.size = size;
14
		setNextBlock(null);
15
		setPrevBlock(null);
16
	}
17
 
18
	public long getStartAddress() {
19
		return startAddress;
20
	}
21
 
22
	public long getEndAddress() {
23
		return endAddress;
24
	}
25
 
26
	public long getSize() {
27
		return size;
28
	}
29
 
30
	public LinkedListBlock getNextBlock() {
31
		return nextBlock;
32
	}
33
 
34
	public void setNextBlock(LinkedListBlock nextBlock) {
35
		this.nextBlock = nextBlock;
36
	}
37
 
38
	public LinkedListBlock getPrevBlock() {
39
		return prevBlock;
40
	}
41
 
42
	public void setPrevBlock(LinkedListBlock prevBlock) {
43
		this.prevBlock = prevBlock;
44
	}
45
 
46
}