private void unregisterEventsForResourceBuilder ( ResourceBuilderModel resourceBuilder ) { resourceBuilder . announceEvents ( ) . stream ( ) . map ( eventSubscribers :: get ) . filter ( Objects :: nonNull ) . forEach ( list -> list . remove ( resourceBuilder ) ) ; }
unregisters the events for the ResourceBuilder