1 package org.newdawn.slick.command;
2
3
4
5
6
7
8 class MouseButtonControl implements Control {
9
10 private final int button;
11
12
13
14
15
16
17 public MouseButtonControl(int button) {
18 this.button = button;
19 }
20
21
22
23
24 @Override
25 public int hashCode() {
26 final int prime = 31;
27 int result = 1;
28 result = prime * result + button;
29 return result;
30 }
31
32
33
34
35 @Override
36 public boolean equals(Object obj) {
37 if (this == obj) {
38 return true;
39 }
40 if (obj == null) {
41 return false;
42 }
43 if (!(obj instanceof MouseButtonControl)) {
44 return false;
45 }
46 MouseButtonControl other = (MouseButtonControl) obj;
47 if (button != other.button) {
48 return false;
49 }
50 return true;
51 }
52
53 }