main/src/main/java/org/onap/policy/pap/main/rest/depundep/PdpGroupDeployProvider.java
/**
     * Updates a DB list with items from a new list.
     *
     * @param dblist the list from the DB
     * @param newList the new list
     * @param setter function to set the new list
     * @return {@code true} if the list changed, {@code false} if the lists were the same
     */
Updates a DB list with items from a new list.
@param dblist the list from the DB
@param newList the new list
@param setter function to set the new list
@return  true if the list changed,  false if the lists were the same
Updates a DB list with items from a new list . @param dblist the list from the DB @param newList the new list @param setter function to set the new list @return true if the list changed false if the lists were the same
private <T> boolean updateList(List<T> dblist, List<T> newList, Consumer<List<T>> setter) {
        Set<T> dbTypes = new HashSet<>(dblist);
        Set<T> newTypes = new HashSet<>(newList);
        if (dbTypes.equals(newTypes)) {
            return false;
        }
        setter.accept(new ArrayList<>(newTypes));
        return true;
    }
private < T > boolean updateList ( List < T > dblist , List < T > newList , Consumer < List < T > > setter ) { Set < T > dbTypes = new HashSet < > ( dblist ) ; Set < T > newTypes = new HashSet < > ( newList ) ; if ( dbTypes . equals ( newTypes ) ) { return false ; } setter . accept ( new ArrayList < > ( newTypes ) ) ; return true ; }
Updates a DB list with items from a new list.
Updates a DB list with items from a new list .