1 package net.kreatious.pianoleopard.midi.event;
2
3
4
5
6
7
8
9
10
11 public class Slot {
12 private final int channel;
13 private final Object key;
14
15 Slot(int channel, Object key) {
16 this.channel = channel;
17 this.key = key;
18 }
19
20 @Override
21 public boolean equals(Object obj) {
22 if (obj == this) {
23 return true;
24 }
25 if (!(obj instanceof Slot)) {
26 return false;
27 }
28 final Slot other = (Slot) obj;
29 return channel == other.channel && key.equals(other.key);
30 }
31
32 @Override
33 public int hashCode() {
34 return 31 * channel + key.hashCode();
35 }
36
37 @Override
38 public String toString() {
39 return key.toString();
40 }
41 }