aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching
diff options
context:
space:
mode:
authorteschi <teschi+github@team23.org>2012-04-03 00:31:14 +0200
committerteschi <teschi+github@team23.org>2012-04-03 00:31:14 +0200
commit61fb8dd256aa799ba8ae464acd30879683f7f032 (patch)
tree4cd6272533d8110c343d335a6e888faaa7fe8081 /main/src/cgeo/geocaching
parent2c42089c944a04cd430ef118754de0fb1067863c (diff)
downloadcgeo-61fb8dd256aa799ba8ae464acd30879683f7f032.zip
cgeo-61fb8dd256aa799ba8ae464acd30879683f7f032.tar.gz
cgeo-61fb8dd256aa799ba8ae464acd30879683f7f032.tar.bz2
renamed LeastRecentlyUsedCache to LeastRecentlyUsedMap
Diffstat (limited to 'main/src/cgeo/geocaching')
-rw-r--r--main/src/cgeo/geocaching/CacheCache.java6
-rw-r--r--main/src/cgeo/geocaching/connector/gc/GCBase.java4
-rw-r--r--main/src/cgeo/geocaching/gcvote/GCVote.java4
-rw-r--r--main/src/cgeo/geocaching/utils/LeastRecentlyUsedMap.java (renamed from main/src/cgeo/geocaching/utils/LeastRecentlyUsedCache.java)4
4 files changed, 9 insertions, 9 deletions
diff --git a/main/src/cgeo/geocaching/CacheCache.java b/main/src/cgeo/geocaching/CacheCache.java
index a2b5324..5be8f75 100644
--- a/main/src/cgeo/geocaching/CacheCache.java
+++ b/main/src/cgeo/geocaching/CacheCache.java
@@ -1,7 +1,7 @@
package cgeo.geocaching;
import cgeo.geocaching.cgData.StorageLocation;
-import cgeo.geocaching.utils.LeastRecentlyUsedCache;
+import cgeo.geocaching.utils.LeastRecentlyUsedMap;
import org.apache.commons.lang3.StringUtils;
@@ -14,12 +14,12 @@ import org.apache.commons.lang3.StringUtils;
public class CacheCache {
private static final int MAX_CACHED_CACHES = 1000;
- final private LeastRecentlyUsedCache<String, cgCache> cachesCache;
+ final private LeastRecentlyUsedMap<String, cgCache> cachesCache;
private static CacheCache instance = null;
private CacheCache() {
- cachesCache = new LeastRecentlyUsedCache<String, cgCache>(MAX_CACHED_CACHES);
+ cachesCache = new LeastRecentlyUsedMap<String, cgCache>(MAX_CACHED_CACHES);
}
public static CacheCache getInstance() {
diff --git a/main/src/cgeo/geocaching/connector/gc/GCBase.java b/main/src/cgeo/geocaching/connector/gc/GCBase.java
index cf768b8..d764c0b 100644
--- a/main/src/cgeo/geocaching/connector/gc/GCBase.java
+++ b/main/src/cgeo/geocaching/connector/gc/GCBase.java
@@ -17,7 +17,7 @@ import cgeo.geocaching.network.Login;
import cgeo.geocaching.network.Network;
import cgeo.geocaching.ui.Formatter;
import cgeo.geocaching.utils.BaseUtils;
-import cgeo.geocaching.utils.LeastRecentlyUsedCache;
+import cgeo.geocaching.utils.LeastRecentlyUsedMap;
import cgeo.geocaching.utils.Log;
import org.apache.commons.collections.CollectionUtils;
@@ -185,7 +185,7 @@ public class GCBase {
try {
- final LeastRecentlyUsedCache<String, String> nameCache = new LeastRecentlyUsedCache<String, String>(2000); // JSON id, cache name
+ final LeastRecentlyUsedMap<String, String> nameCache = new LeastRecentlyUsedMap<String, String>(2000); // JSON id, cache name
if (StringUtils.isEmpty(data)) {
throw new JSONException("No page given");
diff --git a/main/src/cgeo/geocaching/gcvote/GCVote.java b/main/src/cgeo/geocaching/gcvote/GCVote.java
index 2f2f370..02bcf45 100644
--- a/main/src/cgeo/geocaching/gcvote/GCVote.java
+++ b/main/src/cgeo/geocaching/gcvote/GCVote.java
@@ -4,7 +4,7 @@ import cgeo.geocaching.Settings;
import cgeo.geocaching.cgCache;
import cgeo.geocaching.network.Network;
import cgeo.geocaching.network.Parameters;
-import cgeo.geocaching.utils.LeastRecentlyUsedCache;
+import cgeo.geocaching.utils.LeastRecentlyUsedMap;
import cgeo.geocaching.utils.Log;
import org.apache.commons.collections.MapUtils;
@@ -29,7 +29,7 @@ public final class GCVote {
private static final Pattern patternVoteElement = Pattern.compile("<vote ([^>]+)>", Pattern.CASE_INSENSITIVE);
private static final int MAX_CACHED_RATINGS = 1000;
- private static LeastRecentlyUsedCache<String, GCVoteRating> ratingsCache = new LeastRecentlyUsedCache<String, GCVoteRating>(MAX_CACHED_RATINGS);
+ private static LeastRecentlyUsedMap<String, GCVoteRating> ratingsCache = new LeastRecentlyUsedMap<String, GCVoteRating>(MAX_CACHED_RATINGS);
/**
* Get user rating for a given guid or geocode. For a guid first the ratings cache is checked
diff --git a/main/src/cgeo/geocaching/utils/LeastRecentlyUsedCache.java b/main/src/cgeo/geocaching/utils/LeastRecentlyUsedMap.java
index 6d18cf5..6e4649e 100644
--- a/main/src/cgeo/geocaching/utils/LeastRecentlyUsedCache.java
+++ b/main/src/cgeo/geocaching/utils/LeastRecentlyUsedMap.java
@@ -7,12 +7,12 @@ import java.util.LinkedHashMap;
*
* @author blafoo
*/
-public class LeastRecentlyUsedCache<K, V> extends LinkedHashMap<K, V> {
+public class LeastRecentlyUsedMap<K, V> extends LinkedHashMap<K, V> {
private static final long serialVersionUID = -5077882607489806620L;
private final int maxEntries;
- public LeastRecentlyUsedCache(int maxEntries) {
+ public LeastRecentlyUsedMap(int maxEntries) {
this.maxEntries = maxEntries;
}