main/src/main/java/org/onap/policy/pap/main/comm/PdpModifyRequestMap.java
/**
     * Removes a PDP from a subgroup.
     *
     * @param pdpName name of the PDP to be removed
     * @param group group from which to attempt to remove the PDP
     * @param subgrp subgroup from which to attempt to remove the PDP
     * @return {@code true} if the PDP was removed, {@code false} if the PDP was not in
     *         the group
     */
Removes a PDP from a subgroup.
@param pdpName name of the PDP to be removed
@param group group from which to attempt to remove the PDP
@param subgrp subgroup from which to attempt to remove the PDP
@return  true if the PDP was removed,  false if the PDP was not in
the group
Removes a PDP from a subgroup . @param pdpName name of the PDP to be removed @param group group from which to attempt to remove the PDP @param subgrp subgroup from which to attempt to remove the PDP @return true if the PDP was removed false if the PDP was not in the group
private boolean removeFromSubgroup(String pdpName, PdpGroup group, PdpSubGroup subgrp) {
        Iterator<Pdp> iter = subgrp.getPdpInstances().iterator();
        while (iter.hasNext()) {
            Pdp instance = iter.next();
            if (pdpName.equals(instance.getInstanceId())) {
                logger.info("removed {} from group={} subgroup={}", pdpName, group.getName(), subgrp.getPdpType());
                iter.remove();
                subgrp.setCurrentInstanceCount(subgrp.getPdpInstances().size());
                return true;
            }
        }
        return false;
    }
private boolean removeFromSubgroup ( String pdpName , PdpGroup group , PdpSubGroup subgrp ) { Iterator < Pdp > iter = subgrp . getPdpInstances ( ) . iterator ( ) ; while ( iter . hasNext ( ) ) { Pdp instance = iter . next ( ) ; if ( pdpName . equals ( instance . getInstanceId ( ) ) ) { logger . info ( "removed {} from group={} subgroup={}" , pdpName , group . getName ( ) , subgrp . getPdpType ( ) ) ; iter . remove ( ) ; subgrp . setCurrentInstanceCount ( subgrp . getPdpInstances ( ) . size ( ) ) ; return true ; } } return false ; }
Removes a PDP from a subgroup.
Removes a PDP from a subgroup .