question: private Set < DTNHost > selectTrackedHosts ( List < DTNHost > allHosts ) { Set < DTNHost > trackedHosts = new HashSet < DTNHost > ( ) ; if ( this . nrofHosts > allHosts . size ( ) ) { throw new SettingsError ( "Can't use more hosts than there are " + "in the simulation scenario" ) ; } for ( int i = 0 ; i < nrofHosts ; i ++ ) { DTNHost nextHost = allHosts . get ( rng . nextInt ( allHosts . size ( ) ) ) ; if ( trackedHosts . contains ( nextHost ) ) { i -- ; } else { trackedHosts . add ( nextHost ) ; } } return trackedHosts ; }
target:  Randomly selects the hosts to track