Subversion Repositories HomeAutomation

Rev

Details | Last modification | View Log | SVN | RSS feed

Rev Author Line No. Line
915 migan 1
package items;
2
 
3
public class CanClass
4
{
5
    private int id;
6
    private String name;
7
    private String description;
8
 
9
    public CanClass() { }
10
 
11
    public CanClass(int id, String name, String description)
12
    {
13
        this.id = id;
14
        this.name = name;
15
        this.description = description;
16
    }
17
 
18
    public int getId()
19
    {
20
        return id;
21
    }
22
 
23
    public void setId(int id)
24
    {
25
        this.id = id;
26
    }
27
 
28
    public String getName()
29
    {
30
        return name;
31
    }
32
 
33
    public void setName(String name)
34
    {
35
        this.name = name;
36
    }
37
 
38
    public String getDescription()
39
    {
40
        return description;
41
    }
42
 
43
    public void setDescription(String description)
44
    {
45
        this.description = description;
46
    }
47
 
48
    public String getCDefineName()
49
    {
50
        return "CAN_CLASS_MODULE_" +  this.name.toUpperCase();
51
    }
52
 
53
    public String toString()
54
    {
55
        String buffer = "";
56
        buffer += this.getName() + " (" + this.getId() + ")\n";
57
        buffer += "C define name: " + this.getCDefineName() + "\n";
58
        buffer += "Description: " + this.getDescription() + "\n";
59
        return buffer;
60
    }
61
}