void
    updateGroups(List<DapGroup> groups)
    {
        // Verify that the incoming groups are all and only in the list of groups.
        assert (groups.size() == this.groups.size()) : "Update groups: not same size";
        for(DapGroup g : groups) {
            if(!this.groups.contains(g))
                assert (false) : "Update groups: attempt to add new group";
        }
    }
void updateGroups ( List < DapGroup > groups ) { assert ( groups . size ( ) == this . groups . size ( ) ) : "Update groups: not same size" ; for ( DapGroup g : groups ) { if ( ! this . groups . contains ( g ) ) assert ( false ) : "Update groups: attempt to add new group" ; } }
We will need to re-order the groups