Code example for WeakHashMap

Methods: clear

0
        mLatitude = latitude;
        mLongitude = longitude;
        mHasChanged = true;
        isInitialized = true;
        mSortedList = null;
        mDistances.clear();
    } 
 
    public double getFurthestCacheDistance() { 
        if (!isInitialized) {
            Log.e("geohunter", "getFurthestCacheDistance called before setCenter");
            return 0; 
        } 
        if (mSortedList == null || mCachesProvider.hasChanged()) {
            updateSortedList(); 
        } 
        if (mSortedList.size() == 0)
            return 0; 
        return mSortedList.get(mSortedList.size()-1).getDistanceTo(mLatitude, mLongitude);
    } 
}