RuneHive-Game
Loading...
Searching...
No Matches
FileDescriptor.java
Go to the documentation of this file.
1
package
dev.advo.fs.fs;
2
3
/**
4
* A class which points to a file in the cache.
5
* @author Graham
6
*/
7
public
final
class
FileDescriptor
{
8
9
@Override
10
public
String
toString
() {
11
return
" [type="
+
type
+
", file="
+
file
+
"]"
;
12
}
13
14
/**
15
* The file type.
16
*/
17
private
final
int
type
;
18
19
/**
20
* The file id.
21
*/
22
private
final
int
file
;
23
24
/**
25
* Creates the file descriptor.
26
* @param type The file type.
27
* @param file The file id.
28
*/
29
public
FileDescriptor
(
int
type
,
int
file
) {
30
this.type =
type
;
31
this.file =
file
;
32
}
33
34
/**
35
* Gets the file type.
36
* @return The file type.
37
*/
38
public
int
getType
() {
39
return
type
;
40
}
41
42
/**
43
* Gets the file id.
44
* @return The file id.
45
*/
46
public
int
getFile
() {
47
return
file
;
48
}
49
50
}
dev.advo.fs.fs.FileDescriptor.toString
String toString()
Definition
FileDescriptor.java:10
dev.advo.fs.fs.FileDescriptor.file
final int file
The file id.
Definition
FileDescriptor.java:22
dev.advo.fs.fs.FileDescriptor.FileDescriptor
FileDescriptor(int type, int file)
Creates the file descriptor.
Definition
FileDescriptor.java:29
dev.advo.fs.fs.FileDescriptor.type
final int type
The file type.
Definition
FileDescriptor.java:17
dev.advo.fs.fs.FileDescriptor.getFile
int getFile()
Gets the file id.
Definition
FileDescriptor.java:46
dev.advo.fs.fs.FileDescriptor.getType
int getType()
Gets the file type.
Definition
FileDescriptor.java:38