Rev 15 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 15 | Rev 73 | ||
|---|---|---|---|
| 1 | /* |
1 | /* |
| 2 | * MbLocation.java |
2 | * MbLocation.java |
| 3 | * |
3 | * |
| 4 | * Created on den 28 augusti 2003, 13:49 |
4 | * Created on den 28 augusti 2003, 13:49 |
| 5 | */ |
5 | */ |
| 6 | package Macbeth.System; |
6 | package Macbeth.System; |
| 7 | 7 | ||
| 8 | /** |
8 | /** |
| 9 | * A Macbeth location. This consists of a kernel name and a module name. |
9 | * A Macbeth location. This consists of a kernel name and a module name. |
| 10 | * @author Jimmy |
10 | * @author Jimmy |
| 11 | */ |
11 | */ |
| 12 | public class MbLocation { |
12 | public class MbLocation { |
| 13 | //Name of the kernel |
13 | //Name of the kernel |
| 14 | private String kernel; |
14 | private String kernel; |
| 15 | //Name of the module within the specified kernel |
15 | //Name of the module within the specified kernel |
| 16 | private String module; |
16 | private String module; |
| 17 | 17 | ||
| 18 | /** |
18 | /** |
| 19 | * Creates a new instance of MbLocation. |
19 | * Creates a new instance of MbLocation. |
| 20 | */ |
20 | */ |
| 21 | public MbLocation() { |
21 | public MbLocation() { |
| 22 | kernel = null; |
22 | kernel = null; |
| 23 | module = null; |
23 | module = null; |
| 24 | } |
24 | } |
| 25 | 25 | ||
| 26 | /** |
26 | /** |
| 27 | * Creates a new instance of MbLocation. |
27 | * Creates a new instance of MbLocation. |
| 28 | * @param kernel The kernel name. |
28 | * @param kernel The kernel name. |
| 29 | * @param module The module name. |
29 | * @param module The module name. |
| 30 | */ |
30 | */ |
| 31 | public MbLocation(String kernel, String module) { |
31 | public MbLocation(String kernel, String module) { |
| 32 | this.kernel = kernel; |
32 | this.kernel = kernel; |
| 33 | this.module = module; |
33 | this.module = module; |
| 34 | } |
34 | } |
| 35 | 35 | ||
| 36 | /** |
36 | /** |
| 37 | * Returns the name of the kernel. |
37 | * Returns the name of the kernel. |
| 38 | * @return the name of the kernel. |
38 | * @return the name of the kernel. |
| 39 | */ |
39 | */ |
| 40 | public synchronized String getKernel() { |
40 | public synchronized String getKernel() { |
| 41 | return kernel; |
41 | return kernel; |
| 42 | } |
42 | } |
| 43 | /** |
43 | /** |
| 44 | * Sets the name of the kernel. |
44 | * Sets the name of the kernel. |
| 45 | * @param kernel The name of the kernel. |
45 | * @param kernel The name of the kernel. |
| 46 | */ |
46 | */ |
| 47 | public synchronized void setKernel(String kernel) { |
47 | public synchronized void setKernel(String kernel) { |
| 48 | this.kernel = kernel; |
48 | this.kernel = kernel; |
| 49 | } |
49 | } |
| 50 | 50 | ||
| 51 | /** |
51 | /** |
| 52 | * Returns the name of the module. |
52 | * Returns the name of the module. |
| 53 | * @return the name of the module. |
53 | * @return the name of the module. |
| 54 | */ |
54 | */ |
| 55 | public synchronized String getModule() { |
55 | public synchronized String getModule() { |
| 56 | return module; |
56 | return module; |
| 57 | } |
57 | } |
| 58 | /** |
58 | /** |
| 59 | * Sets the name of the module. |
59 | * Sets the name of the module. |
| 60 | * @param module the name of the module. |
60 | * @param module the name of the module. |
| 61 | */ |
61 | */ |
| 62 | public synchronized void setModule(String module) { |
62 | public synchronized void setModule(String module) { |
| 63 | this.module = module; |
63 | this.module = module; |
| 64 | } |
64 | } |
| 65 | 65 | ||
| 66 | /** |
66 | /** |
| 67 | * Prints location as a String. |
67 | * Prints location as a String. |
| 68 | * @return A string with location info. |
68 | * @return A string with location info. |
| 69 | */ |
69 | */ |
| 70 | public String toString() { |
70 | public String toString() { |
| 71 | String str = "Kernel:" + kernel + ", Module:" + module; |
71 | String str = "Kernel:" + kernel + ", Module:" + module; |
| 72 | return str; |
72 | return str; |
| 73 | } |
73 | } |
| 74 | } |
74 | } |
| 75 | 75 | ||