package ru.agentlab.maia.event;

import java.util.Objects;

import ru.agentlab.maia.IEvent;

public abstract class Event<T> implements IEvent<T> {

	protected final T payload;

	public Event(T payload) {
		this.payload = payload;
	}

	@Override
	public T getPayload() {
		return payload;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj == null) {
			return false;
		}
		if (obj == this) {
			return true;
		}
		if (obj instanceof IEvent<?>) {
			IEvent<?> other = (IEvent<?>) obj;
			return (payload == other.getPayload()) && (this.getType() == other.getType());
		} else {
			return false;
		}
	}

	@Override
	public int hashCode() {
		return Objects.hash(getType(), payload);
	}

}

@@ -602,24 +602,131 @@
 se;%0A%09%09%7D%0A%09%7D%0A%0A
+%09@Override%0A%09public String toString() %7B%0A%09%09return getClass().getSimpleName() + %22 %22 + payload.toString();%0A%09%7D%0A%0A
 %09@Override%0A%09

Change toString() serializations for debug