summaryrefslogtreecommitdiffstats
path: root/src/main/java/derms/net/rmulticast/MessageID.java
blob: 5098fed2589456e07f2823c64f3a2fa0bd5acc3a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package derms.net.rmulticast;

class MessageID {
    int id;

    MessageID(int id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        return id;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null)
            return false;
        if (obj.getClass() != this.getClass())
            return false;
        MessageID other = (MessageID) obj;
        return other.id == this.id;
    }
}