cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus/src/main/java/org/cloudbus/cloudsim/allocationpolicies/power/PowerVmAllocationPolicyMigrationAbstract.java
public PowerHost findHostForVm(final Vm vm, final Set<? extends Host> excludedHosts, Predicate<PowerHost> predicate) {
        final Stream<PowerHost> stream = this.<PowerHost>getHostList().stream()
            .filter(h -> !excludedHosts.contains(h))
            .filter(h -> h.isSuitableForVm(vm))
            .filter(h -> isNotHostOverloadedAfterAllocation(h, vm))
            .filter(predicate);

        return findHostForVmInternal(vm, stream).orElse(PowerHost.NULL);
    }
/**
     * Finds a Host that has enough resources to place a given VM and that will not
     * be overloaded after the placement. The selected Host will be that
     * one with most efficient power usage for the given VM.
     *
     * <p>This method performs the basic filtering and delegates additional ones
     * and the final selection of the Host to other method.</p>
     *
     * @param vm the VM
     * @param excludedHosts the excluded hosts
     * @param predicate an additional {@link Predicate} to be used to filter
     *                  the Host to place the VM
     * @return the PM found to host the VM or {@link PowerHost#NULL} if not found
     * @see #findHostForVmInternal(Vm, Stream)
     */
Finds a Host that has enough resources to place a given VM and that will not
be overloaded after the placement. The selected Host will be that
one with most efficient power usage for the given VM.

This method performs the basic filtering and delegates additional ones
and the final selection of the Host to other method.


Finds a Host that has enough resources to place a given VM and that will not be overloaded after the placement . The selected Host will be that one with most efficient power usage for the given VM . This method performs the basic filtering and delegates additional ones and the final selection of the Host to other method .
public PowerHost findHostForVm(final Vm vm, final Set<? extends Host> excludedHosts, Predicate<PowerHost> predicate) {
        final Stream<PowerHost> stream = this.<PowerHost>getHostList().stream()
            .filter(h -> !excludedHosts.contains(h))
            .filter(h -> h.isSuitableForVm(vm))
            .filter(h -> isNotHostOverloadedAfterAllocation(h, vm))
            .filter(predicate);
        return findHostForVmInternal(vm, stream).orElse(PowerHost.NULL);
    }
public PowerHost findHostForVm ( final Vm vm , final Set < ? extends Host > excludedHosts , Predicate < PowerHost > predicate ) { final Stream < PowerHost > stream = this . < PowerHost > getHostList ( ) . stream ( ) . filter ( h -> ! excludedHosts . contains ( h ) ) . filter ( h -> h . isSuitableForVm ( vm ) ) . filter ( h -> isNotHostOverloadedAfterAllocation ( h , vm ) ) . filter ( predicate ) ; return findHostForVmInternal ( vm , stream ) . orElse ( PowerHost . NULL ) ; }
Finds a Host that has enough resources to place a given VM and that will not
 be overloaded after the placement.
Finds a Host that has enough resources to place a given VM and that will not be overloaded after the placement .