For readability, it would be worth renaming the arrived/departed Sets to added/removed, respectively, since those terms match the onChildAdded/Removed method names for the listener.