private void registerHost(SimEvent ev){
  NetworkHost hs=(NetworkHost)ev.getData();
  hostlist.put(hs.getId(),hs);
}

private void registerHost ( SimEvent ev ) { NetworkHost hs = ( NetworkHost ) ev . getData ( ) ; hostlist . put ( hs . getId ( ) , hs ) ; }
register a host that is connected to the switch .
