RuneHive-Game
Loading...
Searching...
No Matches
FileDescriptor.java
Go to the documentation of this file.
1package dev.advo.fs.fs;
2
3/**
4 * A class which points to a file in the cache.
5 * @author Graham
6 */
7public 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}
FileDescriptor(int type, int file)
Creates the file descriptor.
final int type
The file type.
int getFile()
Gets the file id.
int getType()
Gets the file type.