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
Modifier and TypeFieldDescriptionprotected final Map<BusEventKey,
List<Registration>> The map used to store theRegistration
s of the bus -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
addRegistration
(BusEventKey eventKey, Registration registration) The abstract method to add a newRegistration
to theRegistration
s map.void
clear()
Clear all theBusEventKey
s contained in theregistrations
mapboolean
containsKey
(BusEventKey eventKey) Check if theregistrations
map contains aBusEventKey
get
(BusEventKey eventKey) Getter method to obtain the list ofRegistration
s for aBusEventKey
boolean
isEmpty()
Check if theregistrations
map is empty or notkeySet()
Obtains all theBusEventKey
s contained in theregistrations
map as a java set of keysint
size()
Check the size of theregistrations
map
-
Field Details
-
registrations
The map used to store theRegistration
s of the bus
-
-
Constructor Details
-
EventsRegistrationsMap
public EventsRegistrationsMap()
-
-
Method Details
-
get
Getter method to obtain the list ofRegistration
s for aBusEventKey
- Parameters:
eventKey
- A key for events used by theEventBus
- Returns:
- The list of
Registration
s for aBusEventKey
- See Also:
-
isEmpty
public boolean isEmpty()Check if theregistrations
map 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 theregistrations
map- Returns:
- The size of the
registrations
map
-
containsKey
Check if theregistrations
map contains aBusEventKey
- Parameters:
eventKey
- The passedBusEventKey
to check if it's already defined into theregistrations
map- Returns:
- A boolean value equals to 'true' if the passed
BusEventKey
is defined into theregistrations
map, or false otherwise
-
keySet
Obtains all theBusEventKey
s contained in theregistrations
map as a java set of keys- Returns:
- all the
BusEventKey
s contained in theregistrations
map as a java set of keys
-
clear
public void clear()Clear all theBusEventKey
s contained in theregistrations
map -
addRegistration
The abstract method to add a newRegistration
to theRegistration
s map.- Parameters:
eventKey
- TheBusEventKey
used to add a newRegistration
.registration
- TheRegistration
to add.
-