Android Open Source - SensorModelDataCollector Wi Fi Scan Result Hash Map






From Project

Back to project page SensorModelDataCollector.

License

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.

Java Source Code

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





Java Source Code List

com.clarkson.sensormodeldatacollector.MainMenu.java
com.clarkson.sensormodeldatacollector.TimestampedRSS.java
com.clarkson.sensormodeldatacollector.WiFiScanActivity.java
com.clarkson.sensormodeldatacollector.WiFiScanResultAdapter.java
com.clarkson.sensormodeldatacollector.WiFiScanResultHashMap.java
com.clarkson.sensormodeldatacollector.WiFiScanResult.java
com.clarkson.sensormodeldatacollector.util.SystemUiHiderBase.java
com.clarkson.sensormodeldatacollector.util.SystemUiHiderHoneycomb.java
com.clarkson.sensormodeldatacollector.util.SystemUiHider.java