We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1adf998 commit b652ec5Copy full SHA for b652ec5
src/env/entity/room/RoomID.java
@@ -8,6 +8,8 @@
8
9
package entity.room;
10
11
+import java.util.Objects;
12
+
13
/**
14
* Room identifier.
15
*/
@@ -29,4 +31,21 @@ public RoomID(final String id) {
29
31
public String getId() {
30
32
return this.id;
33
}
34
35
+ @Override
36
+ public final boolean equals(final Object other) {
37
+ if (this == other) {
38
+ return true;
39
+ }
40
+ if (other == null || this.getClass() != other.getClass()) {
41
+ return false;
42
43
+ final RoomID that = (RoomID) other;
44
+ return this.getId().equals(that.getId());
45
46
47
48
+ public final int hashCode() {
49
+ return Objects.hash(this.getId());
50
51
0 commit comments