package geniusweb.inform; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import geniusweb.actions.Action; /** * Informs that someone did an action */ public class ActionDone implements Inform { private final Action action; @JsonCreator public ActionDone(@JsonProperty("action") Action action) { this.action = action; } public Action getAction() { return action; } @Override public String toString() { return "ActionDone[" + action + "]"; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((action == null) ? 0 : action.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; ActionDone other = (ActionDone) obj; if (action == null) { if (other.action != null) return false; } else if (!action.equals(other.action)) return false; return true; } }