Module it.rebirthproject.ufoeb
Class EventsRegistrationsMap
java.lang.Object
it.rebirthproject.ufoeb.dto.registrations.maps.interfaces.EventsRegistrationsMap
- Direct Known Subclasses:
PriorityEventsRegistrationsMap,UnorderedEventsRegistrationsMap
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Map<BusEventKey,List<Registration>> The map used to store theRegistrations of the bus -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidaddRegistration(BusEventKey eventKey, Registration registration) The abstract method to add a newRegistrationto theRegistrations map.voidclear()Clear all theBusEventKeys contained in theregistrationsmapbooleancontainsKey(BusEventKey eventKey) Check if theregistrationsmap contains aBusEventKeyget(BusEventKey eventKey) Getter method to obtain the list ofRegistrations for aBusEventKeybooleanisEmpty()Check if theregistrationsmap is empty or notkeySet()Obtains all theBusEventKeys contained in theregistrationsmap as a java set of keysintsize()Check the size of theregistrationsmap
-
Field Details
-
registrations
The map used to store theRegistrations of the bus
-
-
Constructor Details
-
EventsRegistrationsMap
public EventsRegistrationsMap()
-
-
Method Details
-
get
Getter method to obtain the list ofRegistrations for aBusEventKey- Parameters:
eventKey- A key for events used by theEventBus- Returns:
- The list of
Registrations for aBusEventKey - See Also:
-
isEmpty
public boolean isEmpty()Check if theregistrationsmap is empty or not- Returns:
- A boolean value, which is true if the map 'registrations' is empty or false otherwise
-
size
public int size()Check the size of theregistrationsmap- Returns:
- The size of the
registrationsmap
-
containsKey
Check if theregistrationsmap contains aBusEventKey- Parameters:
eventKey- The passedBusEventKeyto check if it's already defined into theregistrationsmap- Returns:
- A boolean value equals to 'true' if the passed
BusEventKeyis defined into theregistrationsmap, or false otherwise
-
keySet
Obtains all theBusEventKeys contained in theregistrationsmap as a java set of keys- Returns:
- all the
BusEventKeys contained in theregistrationsmap as a java set of keys
-
clear
public void clear()Clear all theBusEventKeys contained in theregistrationsmap -
addRegistration
The abstract method to add a newRegistrationto theRegistrations map.- Parameters:
eventKey- TheBusEventKeyused to add a newRegistration.registration- TheRegistrationto add.
-