package it.cavallium.warppi.event; import java.util.List; public class TouchMoveEvent implements TouchEvent { private final List changedTouches; private final List touches; public TouchMoveEvent(final List changedTouches, final 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(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final TouchMoveEvent other = (TouchMoveEvent) 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 "TouchMoveEvent [changedTouches=" + changedTouches + ", touches=" + touches + "]"; } }