-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHandle.java
More file actions
55 lines (46 loc) · 1.11 KB
/
Handle.java
File metadata and controls
55 lines (46 loc) · 1.11 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// -------------------------------------------------------------------------
/**
* handle stores a position information of the record returned by memmanager.
*
* @author wenfeng ren (rwenfeng)
* @version Sep 7, 2014
*/
public class Handle
{
// data fields
/**
* the position that MemManager returned.
*/
private int position;
// ----------------------------------------------------------
/**
* Create a new Handle object with initial position.
*
* @param position
*/
public Handle(int position)
{
this.position = position;
}
// ----------------------------------------------------------
/**
* get the position stored in handle.
*
* @return position stores in handle
*/
public int getPosition()
{
return position;
}
// ----------------------------------------------------------
/**
* set new position for handle.
*
* @param newPosition
* that needs to be set
*/
public void setPosition(int newPosition)
{
this.position = newPosition;
}
}