Code example for LinkedHashMap

 * Shadow of {@code LocationManager} that provides for the simulation of different location providers being enabled and 
 * disabled. 
public class ShadowLocationManager { 
  private final Map<String, LocationProviderEntry> providersEnabled = new LinkedHashMap<String, LocationProviderEntry>();
  private final Map<String, Location> lastKnownLocations = new HashMap<String, Location>();
  private final Map<PendingIntent, Criteria> requestLocationUdpateCriteriaPendingIntents = new HashMap<PendingIntent, Criteria>();
  private final Map<PendingIntent, String> requestLocationUdpateProviderPendingIntents = new HashMap<PendingIntent, String>();
  private final ArrayList<Listener> gpsStatusListeners = new ArrayList<Listener>();
  private Criteria lastBestProviderCriteria;
  private boolean lastBestProviderEnabled;
  private String bestEnabledProvider, bestDisabledProvider;
  /** Location listeners along with metadata on when they should be fired. */ 
  private static final class ListenerRegistration { 
    final long minTime;
    final float minDistance;
    final LocationListener listener;