package speiger.src.coreengine.utils.eventbus;

public class Event
{
	boolean canceled = false;
	
	public void setCanceled(boolean canceled) {
		if(isCancelable()) this.canceled = canceled;
		else throw new UnsupportedOperationException("Only Cancelable Events can be canceled");
	}
	
	public final void cancel() { setCanceled(true); }
	public final boolean isCanceled() { return canceled; }
	public boolean isCancelable() { return false; }
}
