Class OceanusEventRegistration<E extends Enum<E>>
java.lang.Object
io.github.tonywasher.joceanus.oceanus.event.OceanusEventRegistration<E>
- Type Parameters:
E- The event id type
Registration structure for event listeners.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedOceanusEventRegistration(Integer pMgrId, E pEventId, OceanusEvent.OceanusEventListener<E> pListener) Constructor.protectedOceanusEventRegistration(Integer pMgrId, OceanusEvent.OceanusEventListener<E> pListener) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected IntegergetRegId()Obtain the registration id.inthashCode()protected booleanisFiltered(E pEventId) Is the event filtered?booleanisRelevant(OceanusEvent<E> pEvent) Is the event aimed at this registration.protected voidprocessEvent(OceanusEvent<E> pEvent) Process the relevant event.protected voidSet the registration id.
-
Constructor Details
-
OceanusEventRegistration
Constructor.- Parameters:
pMgrId- the manager IdpListener- the listener
-
OceanusEventRegistration
protected OceanusEventRegistration(Integer pMgrId, E pEventId, OceanusEvent.OceanusEventListener<E> pListener) Constructor.- Parameters:
pMgrId- the manager IdpEventId- the eventId to filter onpListener- the listener
-
-
Method Details
-
isRelevant
Is the event aimed at this registration.- Parameters:
pEvent- the event- Returns:
- true/false
-
getRegId
Obtain the registration id.- Returns:
- the id
-
setRegId
Set the registration id.- Parameters:
pId- the id
-
processEvent
Process the relevant event.- Parameters:
pEvent- the event.
-
isFiltered
Is the event filtered?- Parameters:
pEventId- the event Id- Returns:
- true/false
-
equals
-
hashCode
public int hashCode()
-