package it.cavallium.warppi.event; import java.util.List; public class TouchEndEvent implements TouchEvent { private final List changedTouches; private final List touches; public TouchEndEvent(List changedTouches, List touches) { super(); this.changedTouches = changedTouches; this.touches = touches; } @Override public List getChangedTouches() { return changedTouches; } @Override public List getTouches() { return touches; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((changedTouches == null) ? 0 : changedTouches.hashCode()); result = prime * result + ((touches == null) ? 0 : touches.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; TouchEndEvent other = (TouchEndEvent) obj; if (changedTouches == null) { if (other.changedTouches != null) return false; } else if (!changedTouches.equals(other.changedTouches)) return false; if (touches == null) { if (other.touches != null) return false; } else if (!touches.equals(other.touches)) return false; return true; } @Override public String toString() { return "TouchEndEvent [changedTouches=" + changedTouches + ", touches=" + touches + "]"; } }