aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2012-03-24 11:03:31 +0100
committerSamuel Tardieu <sam@rfc1149.net>2012-03-24 11:03:31 +0100
commit8fa199bf1c6baa137a4dcfd6ffd3a82b42bbb0a8 (patch)
tree5f4ddc0e42ca46f869e20df0942e7fe144d0f5e6 /main
parent8a53f37e5162ad0c068f57c3b1684fb7364031e8 (diff)
downloadcgeo-8fa199bf1c6baa137a4dcfd6ffd3a82b42bbb0a8.zip
cgeo-8fa199bf1c6baa137a4dcfd6ffd3a82b42bbb0a8.tar.gz
cgeo-8fa199bf1c6baa137a4dcfd6ffd3a82b42bbb0a8.tar.bz2
Rename LRUList into BoundedList
This class is not a LRU (Least Recently Used) list, in that it does not keep track of how elements are accessed. It is a bounded list whose maximum capacity gets maintained using a FIFO order.
Diffstat (limited to 'main')
-rw-r--r--main/src/cgeo/geocaching/maps/CGeoMap.java4
-rw-r--r--main/src/cgeo/geocaching/utils/BoundedList.java (renamed from main/src/cgeo/geocaching/utils/LRUList.java)4
2 files changed, 4 insertions, 4 deletions
diff --git a/main/src/cgeo/geocaching/maps/CGeoMap.java b/main/src/cgeo/geocaching/maps/CGeoMap.java
index 08be66a..d241f04 100644
--- a/main/src/cgeo/geocaching/maps/CGeoMap.java
+++ b/main/src/cgeo/geocaching/maps/CGeoMap.java
@@ -36,7 +36,7 @@ import cgeo.geocaching.maps.interfaces.OnMapDragListener;
import cgeo.geocaching.maps.interfaces.OtherCachersOverlayItemImpl;
import cgeo.geocaching.network.Login;
import cgeo.geocaching.utils.CancellableHandler;
-import cgeo.geocaching.utils.LRUList;
+import cgeo.geocaching.utils.BoundedList;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
@@ -170,7 +170,7 @@ public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFacto
private static Map<Integer, LayerDrawable> overlaysCache = new HashMap<Integer, LayerDrawable>();
private int cachesCnt = 0;
/** List of caches in the viewport */
- private final LRUList<cgCache> caches = new LRUList<cgCache>(MAX_CACHES);
+ private final BoundedList<cgCache> caches = new BoundedList<cgCache>(MAX_CACHES);
// storing for offline
private ProgressDialog waitDialog = null;
private int detailTotal = 0;
diff --git a/main/src/cgeo/geocaching/utils/LRUList.java b/main/src/cgeo/geocaching/utils/BoundedList.java
index 13596b1..3fa1112 100644
--- a/main/src/cgeo/geocaching/utils/LRUList.java
+++ b/main/src/cgeo/geocaching/utils/BoundedList.java
@@ -8,12 +8,12 @@ import java.util.Collection;
*
* @author blafoo
*/
-public class LRUList<T> extends ArrayList<T> {
+public class BoundedList<T> extends ArrayList<T> {
private static final long serialVersionUID = -5077882607489806620L;
private final int maxEntries;
- public LRUList(int maxEntries) {
+ public BoundedList(int maxEntries) {
this.maxEntries = maxEntries;
}