cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus/src/main/java/org/cloudbus/cloudsim/core/CloudInformationService.java
private boolean datacenterExists(Collection<Datacenter> list, Integer datacenterId) {
        if (Objects.isNull(list) || Objects.isNull(datacenterId) || datacenterId < 0) {
            return false;
        }

        return list.stream().map(Datacenter::getId).anyMatch(datacenterId::equals);
    }
/**
     * Checks whether a Datacenter list contains a particular Datacenter id.
     *
     * @param list         list of Datacenter id
     * @param datacenterId a Datacenter ID to find
     * @return true if a Datacenter is in the list, otherwise false
     * @pre list != null
     * @pre id > 0
     * @post $none
     */
Checks whether a Datacenter list contains a particular Datacenter id.
Checks whether a Datacenter list contains a particular Datacenter id .
private boolean datacenterExists(Collection<Datacenter> list, Integer datacenterId) {
        if (Objects.isNull(list) || Objects.isNull(datacenterId) || datacenterId < 0) {
            return false;
        }
        return list.stream().map(Datacenter::getId).anyMatch(datacenterId::equals);
    }
private boolean datacenterExists ( Collection < Datacenter > list , Integer datacenterId ) { if ( Objects . isNull ( list ) || Objects . isNull ( datacenterId ) || datacenterId < 0 ) { return false ; } return list . stream ( ) . map ( Datacenter :: getId ) . anyMatch ( datacenterId :: equals ) ; }
Checks whether a Datacenter list contains a particular Datacenter id.
Checks whether a Datacenter list contains a particular Datacenter id .