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; } }