Subversion Repositories HomeAutomation

Rev

Rev 641 | Details | Compare with Previous | Last modification | View Log | SVN | RSS feed

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