cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus/src/main/java/org/cloudbus/cloudsim/network/switches/RootSwitch.java
private Switch findAggregateSwitchConnectedToGivenEdgeSwitch(Switch edgeSwitch) {
        for (Switch aggregateSw : getDownlinkSwitches()) {
            for (Switch edgeSw : aggregateSw.getDownlinkSwitches()) {
                if (edgeSw.getId() == edgeSwitch.getId()) {
                    return aggregateSw;
                }
            }
        }

        return Switch.NULL;
    }
/**
     * Finds which aggregate switch is connected to a given edge switch
     * @param edgeSwitch the id of the edge switch to find the aggregate switch
     * that it is connected to
     * @return the id of the aggregate switch that is connected to the given
     * edge switch or {@link Switch#NULL} if not found.
     */
Finds which aggregate switch is connected to a given edge switch
@param edgeSwitch the id of the edge switch to find the aggregate switch
that it is connected to
@return the id of the aggregate switch that is connected to the given
edge switch or  Switch#NULL if not found.
Finds which aggregate switch is connected to a given edge switch @param edgeSwitch the id of the edge switch to find the aggregate switch that it is connected to @return the id of the aggregate switch that is connected to the given edge switch or Switch#NULL if not found .
private Switch findAggregateSwitchConnectedToGivenEdgeSwitch(Switch edgeSwitch) {
        for (Switch aggregateSw : getDownlinkSwitches()) {
            for (Switch edgeSw : aggregateSw.getDownlinkSwitches()) {
                if (edgeSw.getId() == edgeSwitch.getId()) {
                    return aggregateSw;
                }
            }
        }
        return Switch.NULL;
    }
private Switch findAggregateSwitchConnectedToGivenEdgeSwitch ( Switch edgeSwitch ) { for ( Switch aggregateSw : getDownlinkSwitches ( ) ) { for ( Switch edgeSw : aggregateSw . getDownlinkSwitches ( ) ) { if ( edgeSw . getId ( ) == edgeSwitch . getId ( ) ) { return aggregateSw ; } } } return Switch . NULL ; }
Finds which aggregate switch is connected to a given edge switch
 @param edgeSwitch the id of the edge switch to find the aggregate switch
 that it is connected to
 @return the id of the aggregate switch that is connected to the given
 edge switch or {@link Switch#NULL} if not found.
Finds which aggregate switch is connected to a given edge switch @param edgeSwitch the id of the edge switch to find the aggregate switch that it is connected to @return the id of the aggregate switch that is connected to the given edge switch or { @link Switch#NULL } if not found .