/** * Get the network by the given fabric ID. Return null if not found. * * @param networks * @param fabricId * @return */ private Network getNetworkByNativeId(List<Network> networks, String fabricId) { for (Network network : networks) { if (network != null && network.getNativeId() != null && network.getNativeId().equals(fabricId)) { return network; } } return null; }
/** * Get the connected network systems which are connected by the given transit network. * * @param transitNetwork * @param allNetworks * @return */ private Set<String> getConnectedNetworkSystems(String transitNetwork, List<Network> allNetworks) { Set<String> connectedNetworkSystems = new HashSet<String>(); for (Network network : allNetworks) { if (network.getNetworkSystems() != null && transitNetwork.equals(network.getNativeId())) { for (String networkSystem : network.getNetworkSystems()) { connectedNetworkSystems.add(networkSystem); } } } return connectedNetworkSystems; }