Android Open Source - satstat Cell Tower List






From Project

Back to project page satstat.

License

The source code is released under:

GNU General Public License

If you think the Android project satstat 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.vonglasow.michael.satstat.data;
//from w  w  w.j ava2  s.c om
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;

public abstract class CellTowerList<T extends CellTower> extends HashMap<String, T> {
  /**
   * Returns all entries in the list.
   * <p>
   * This method returns all entries in the list, with duplicates eliminated.
   * It is preferred over {@link #values()}, which may return duplicates.
   * @return
   */
  public Set<T> getAll() {
    Set<T> result = new HashSet<T>(this.values());
    return result;
  }
  
  /**
   * Removes cells of the specified source.
   * <p>
   * This method clears the flags corresponding to {@code source} in the
   * internal source field of all entries, and removes entries whose source
   * field is null. Call this method prior to adding new data from a source,
   * to tell the list that any cell information previously supplied by this
   * source is no longer current.
   * @param source Any combination of 
   * {@link com.michael.vonglasow.satstat.data.CellTower#SOURCE_CELL_LOCATION},
   * {@link com.michael.vonglasow.satstat.data.CellTower#SOURCE_NEIGHBORING_CELL_INFO}
   * or {@link com.michael.vonglasow.satstat.data.CellTower#SOURCE_CELL_INFO}.
   */
  public void removeSource(int source) {
    ArrayList<String> toDelete = new ArrayList<String>();
    for (String entry : this.keySet()) {
      CellTower ct = this.get(entry);
      ct.source = ct.source & ~source;
      if (ct.source == 0)
        toDelete.add(entry);
    }
    for (String entry : toDelete)
      this.remove(entry);
  }
}




Java Source Code List

com.vonglasow.michael.satstat.AboutActivity.java
com.vonglasow.michael.satstat.GpsEventReceiver.java
com.vonglasow.michael.satstat.MainActivity.java
com.vonglasow.michael.satstat.PasvLocListenerService.java
com.vonglasow.michael.satstat.SettingsActivity.java
com.vonglasow.michael.satstat.WifiCapabilities.java
com.vonglasow.michael.satstat.data.CellTowerCdma.java
com.vonglasow.michael.satstat.data.CellTowerGsm.java
com.vonglasow.michael.satstat.data.CellTowerListCdma.java
com.vonglasow.michael.satstat.data.CellTowerListGsm.java
com.vonglasow.michael.satstat.data.CellTowerListLte.java
com.vonglasow.michael.satstat.data.CellTowerList.java
com.vonglasow.michael.satstat.data.CellTowerLte.java
com.vonglasow.michael.satstat.data.CellTower.java
com.vonglasow.michael.satstat.mapsforge.FileLRUCache.java
com.vonglasow.michael.satstat.mapsforge.ImageFileNameFilter.java
com.vonglasow.michael.satstat.mapsforge.PersistentTileCache.java
com.vonglasow.michael.satstat.widgets.GpsSnrView.java
com.vonglasow.michael.satstat.widgets.GpsStatusView.java
com.vonglasow.michael.satstat.widgets.LocProviderPreference.java
com.vonglasow.michael.satstat.widgets.MapViewPager.java
com.vonglasow.michael.satstat.widgets.NetworkTypePreference.java
com.vonglasow.michael.satstat.widgets.SquareView.java