source: events/src/main/java/geniusweb/inform/ActionDone.java@ 37

Last change on this file since 37 was 35, checked in by bart, 3 years ago

Fixed windows time-out.

File size: 1.0 KB
Line 
1package geniusweb.inform;
2
3import com.fasterxml.jackson.annotation.JsonCreator;
4import com.fasterxml.jackson.annotation.JsonProperty;
5
6import geniusweb.actions.Action;
7
8/**
9 * Informs that someone did an action
10 */
11public class ActionDone implements Inform {
12
13 private final Action action;
14
15 @JsonCreator
16 public ActionDone(@JsonProperty("action") Action action) {
17 this.action = action;
18 }
19
20 public Action getAction() {
21 return action;
22 }
23
24 @Override
25 public String toString() {
26 return "ActionDone[" + action + "]";
27 }
28
29 @Override
30 public int hashCode() {
31 final int prime = 31;
32 int result = 1;
33 result = prime * result + ((action == null) ? 0 : action.hashCode());
34 return result;
35 }
36
37 @Override
38 public boolean equals(Object obj) {
39 if (this == obj)
40 return true;
41 if (obj == null)
42 return false;
43 if (getClass() != obj.getClass())
44 return false;
45 ActionDone other = (ActionDone) obj;
46 if (action == null) {
47 if (other.action != null)
48 return false;
49 } else if (!action.equals(other.action))
50 return false;
51 return true;
52 }
53}
Note: See TracBrowser for help on using the repository browser.