@Override public boolean isMergeableTo(Command c) { if (!(c instanceof OldMoveLinePoint)) { return false; } OldMoveLinePoint mlp = (OldMoveLinePoint) c; if (getRelation() != mlp.getRelation()) { return false; } if (getLinePointId() != mlp.getLinePointId()) { return false; } return true; }