static int numberOfHosts(Map<URI,List<Initiator>> net2InitiatorsMap){
  Set<URI> hostSet=new HashSet<URI>();
  for (  List<Initiator> initiators : net2InitiatorsMap.values()) {
    for (    Initiator init : initiators) {
      hostSet.add(init.getHost());
    }
  }
  return hostSet.size();
}

static int numberOfHosts ( Map < URI , List < Initiator > > net2InitiatorsMap ) { Set < URI > hostSet = new HashSet < URI > ( ) ; for ( List < Initiator > initiators : net2InitiatorsMap . values ( ) ) { for ( Initiator init : initiators ) { hostSet . add ( init . getHost ( ) ) ; } } return hostSet . size ( ) ; }
returns number of hosts in the net2initiatorsmap
