private void updateElements ( Map < String , SetElement > elements ) { for ( SetElement element : elements . values ( ) ) { if ( element . isTombstone ( ) ) { if ( remove ( element ) ) { eventListeners . forEach ( listener -> listener . event ( new SetDelegateEvent <> ( SetDelegateEvent . Type . REMOVE , decode ( element . value ( ) ) ) ) ) ; } } else { if ( add ( element ) ) { eventListeners . forEach ( listener -> listener . event ( new SetDelegateEvent <> ( SetDelegateEvent . Type . ADD , decode ( element . value ( ) ) ) ) ) ; } } } }
Updates the set elements .