-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNode.java
More file actions
35 lines (33 loc) · 832 Bytes
/
Node.java
File metadata and controls
35 lines (33 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package MMS;
/*
Assignment number :10
File Name : Node.java
Name: Ran Zaaroor
Student ID : 209374040
Email : Ran.zaaroor@gmail.com
*/
/**
* Represents a node in a list of memory blocks.
* A node points to a memory block, and to a node.
* <br> (Part of Homework 10 in the Intro to CS course, Efi Arazi School of CS)
*/
public class Node {
// The memory block that this node points at
MemBlock block;
// The next node that this node points at
Node next = null;
/**
* Constructs a new node containing a memory block.
*
* @param block The given memory block
*/
public Node(MemBlock block) {
this.block = block;
}
/**
* A textual representation of this node, useful for debugging.
*/
public String toString() {
return "{" + block + "}";
}
}