Back to project page SensorModelDataCollector.
The source code is released under:
This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a co...
If you think the Android project SensorModelDataCollector listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.clarkson.sensormodeldatacollector; //from w w w . j a va 2 s. c o m import java.util.Collection; import java.util.HashMap; public class WiFiScanResultHashMap { HashMap<String, WiFiScanResult> mWifiScanResultHashMap = new HashMap<String, WiFiScanResult>(); public WiFiScanResultHashMap() { } public WiFiScanResultHashMap( HashMap<String, WiFiScanResult> mWifiScanResultHashMap) { super(); this.mWifiScanResultHashMap = mWifiScanResultHashMap; } public void addItem(WiFiScanResult latestScanResult) { String ssid_key = latestScanResult.getSSID(); if(mWifiScanResultHashMap.containsKey(ssid_key)) { WiFiScanResult scan_result = mWifiScanResultHashMap.get(ssid_key); scan_result.setRSS(latestScanResult.getLatestTimestampedRSS()); mWifiScanResultHashMap.put(ssid_key, scan_result); }//if else { mWifiScanResultHashMap.put(ssid_key, latestScanResult); } }//addItem public void clear() { mWifiScanResultHashMap.clear(); }//clear public int size() { return mWifiScanResultHashMap.size(); } public Collection<WiFiScanResult> values() { return mWifiScanResultHashMap.values(); } }//WiFiScanResultHashMap