Package dev.prozilla.pine.common.event
Class Event<EventType extends Enum<EventType>,Target>
java.lang.Object
dev.prozilla.pine.common.event.Event<EventType,Target>
- Type Parameters:
EventType
- The types of events this event can representTarget
- The type of target this event has
- Direct Known Subclasses:
AssetPoolEvent
,ConfigOptionEvent
,NodeEvent
public class Event<EventType extends Enum<EventType>,Target>
extends Object
implements Cloneable<Event<EventType,Target>>
Represents an event which takes place on a target.
Based on Event - Web APIs | MDN
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
Returns a new object that is equal to this object.boolean
Checks if the given object is equal to this object.boolean
getType()
int
hashCode()
boolean
boolean
void
Prevents other listeners of this event from being called.void
Prevents further propagation of this event.
-
Field Details
-
type
-
target
-
immediatePropagationStopped
protected boolean immediatePropagationStopped -
propagationStopped
protected boolean propagationStopped
-
-
Constructor Details
-
Event
Creates an event of a given type with a given target.- Parameters:
type
- The type of eventtarget
- The target of the event
-
-
Method Details
-
getType
-
getTarget
-
stopImmediatePropagation
public void stopImmediatePropagation()Prevents other listeners of this event from being called. -
stopPropagation
public void stopPropagation()Prevents further propagation of this event. -
isImmediatePropagationStopped
public boolean isImmediatePropagationStopped() -
isPropagationStopped
public boolean isPropagationStopped() -
equals
-
equals
Description copied from interface:Cloneable
Checks if the given object is equal to this object. -
hashCode
public int hashCode() -
clone
Description copied from interface:Cloneable
Returns a new object that is equal to this object.
-