1
|
|
|
/* |
2
|
|
|
* This file is part of ArakneLangLoader. |
3
|
|
|
* |
4
|
|
|
* ArakneLangLoader is free software: you can redistribute it and/or modify |
5
|
|
|
* it under the terms of the GNU Lesser General Public License as published by |
6
|
|
|
* the Free Software Foundation, either version 3 of the License, or |
7
|
|
|
* (at your option) any later version. |
8
|
|
|
* |
9
|
|
|
* ArakneLangLoader is distributed in the hope that it will be useful, |
10
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
11
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12
|
|
|
* GNU Lesser General Public License for more details. |
13
|
|
|
* |
14
|
|
|
* You should have received a copy of the GNU Lesser General Public License |
15
|
|
|
* along with ArakneLangLoader. If not, see <https://www.gnu.org/licenses/>. |
16
|
|
|
* |
17
|
|
|
* Copyright (c) 2020 Vincent Quatrevieux |
18
|
|
|
*/ |
19
|
|
|
|
20
|
|
|
package fr.arakne.swflangloader.lang.hints; |
21
|
|
|
|
22
|
|
|
import java.util.Objects; |
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* Hint category |
26
|
|
|
*/ |
27
|
1 |
|
final public class HintCategory { |
28
|
|
|
private int id; |
29
|
|
|
|
30
|
|
|
/* final */ private String n; |
31
|
|
|
/* final */ private String c; |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* @return The category name |
35
|
|
|
*/ |
36
|
|
|
public String name() { |
37
|
1 |
|
return n; |
38
|
|
|
} |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* @return The category color |
42
|
|
|
*/ |
43
|
|
|
public String color() { |
44
|
1 |
|
return c; |
45
|
|
|
} |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* @return The category id |
49
|
|
|
*/ |
50
|
|
|
public int id() { |
51
|
1 |
|
return id; |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
@Override |
55
|
|
|
public boolean equals(Object o) { |
56
|
1 |
|
if (this == o) return true; |
57
|
1 |
|
if (o == null || getClass() != o.getClass()) return false; |
58
|
1 |
|
HintCategory that = (HintCategory) o; |
59
|
1 |
|
return id == that.id; |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
@Override |
63
|
|
|
public int hashCode() { |
64
|
1 |
|
return Objects.hash(id); |
65
|
|
|
} |
66
|
|
|
|
67
|
|
|
@Override |
68
|
|
|
public String toString() { |
69
|
1 |
|
return "HintCategory{" + n + " (" + id + ")}"; |
70
|
|
|
} |
71
|
|
|
|
72
|
|
|
void setId(int id) { |
73
|
1 |
|
this.id = id; |
74
|
1 |
|
} |
75
|
|
|
} |
76
|
|
|
|