1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package net.sf.dexterim.core;
20
21 /***
22 *@author Christoph Walcher
23 */
24 public class DefaultStatus implements Status {
25 private String code = "";
26 private String name = "";
27
28 /***
29 * Creates a new instance of Status
30 */
31 public DefaultStatus() {
32 }
33
34 /***
35 * Constructor for the Status object
36 *
37 *@param name Description of the Parameter
38 *@param code Description of the Parameter
39 *@param icon Description of the Parameter
40 */
41 public DefaultStatus(String name, String code) {
42 this.name = name;
43 this.code = code;
44 }
45
46 /***
47 * Gets the name attribute of the Status object
48 *
49 *@return The name value
50 */
51 public String getName() {
52 return name;
53 }
54
55 /***
56 * Gets the code attribute of the Status object
57 *
58 *@return The code value
59 */
60 public String getCode() {
61 return code;
62 }
63
64 /***
65 * Description of the Method
66 *
67 *@return Description of the Return Value
68 */
69 public int hashCode() {
70 return code.hashCode();
71 }
72
73 /***
74 * Description of the Method
75 *
76 *@param obj Description of the Parameter
77 *@return Description of the Return Value
78 */
79 public boolean equals(Object obj) {
80 if ((obj != null) && obj instanceof Status) {
81 Status other = (Status)obj;
82
83 return code.equals(other.getCode());
84 }
85
86 return false;
87 }
88
89 /***
90 * Description of the Method
91 *
92 *@return Description of the Return Value
93 */
94 public String toString() {
95 return name;
96 }
97 }