import java.util.HashMap; /** * This interface provides the means for an implementing class to be * notified of room changes that occur in the MobileClient class. When * a room change occurs within the MobileClient class, the * LocationTracker interface's roomChanged() method is called in order * to notify application classes that implement the LocationTracker * interface. *

* Any Java class that creates a MobileClient object needs to implement * the LocationTracker interface so that the MobileClient class can * notify the Java class of any room changes that occur. * * @author Tony Offer * @author Chris Palistrant * @version 1.0 */ public interface LocationTracker { /** * This method is called by the MobileClient class when a change in * room location occurs. A HashMap describing the room distribution * is passed into this method so that any class implementing the * LocationTracker interface can interpret the room change * appropriately. The HashMap stores the relative magnitude of room * messages for wihch ultrasound has been detected. Higher * magnitudes represent a greater likelihood of being in that room. * Thus, the HashMap represents a probability distribution for room * location. * * @param distribution Collection that maps room strings to a * relative magnitude. */ void roomChanged(HashMap distribution); }