aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/list/PseudoList.java
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2013-09-14 14:21:22 +0200
committerBananeweizen <bananeweizen@gmx.de>2013-09-14 14:21:34 +0200
commit947792ed914e4309ecb5159e9878ed15ea1125c9 (patch)
treec62689ef2b6ffa7bb1568e9525ed2760e45aec9a /main/src/cgeo/geocaching/list/PseudoList.java
parent3d5d4c46327244244003982f71aa627d1407d5c3 (diff)
downloadcgeo-947792ed914e4309ecb5159e9878ed15ea1125c9.zip
cgeo-947792ed914e4309ecb5159e9878ed15ea1125c9.tar.gz
cgeo-947792ed914e4309ecb5159e9878ed15ea1125c9.tar.bz2
refactoring: StoredList
* try more encapsulation instead of ID comparisons all time
Diffstat (limited to 'main/src/cgeo/geocaching/list/PseudoList.java')
-rw-r--r--main/src/cgeo/geocaching/list/PseudoList.java21
1 files changed, 19 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/list/PseudoList.java b/main/src/cgeo/geocaching/list/PseudoList.java
index c93f011..365d6fd 100644
--- a/main/src/cgeo/geocaching/list/PseudoList.java
+++ b/main/src/cgeo/geocaching/list/PseudoList.java
@@ -5,10 +5,22 @@ import cgeo.geocaching.R;
public class PseudoList extends AbstractList {
- public static final int ALL_LIST_ID = 2;
+ private static final int ALL_LIST_ID = 2;
+ /**
+ * list entry to show all caches
+ */
public static final PseudoList ALL_LIST = new PseudoList(ALL_LIST_ID, R.string.list_all_lists);
- public PseudoList(int id, final int titleResourceId) {
+ private static final int NEW_LIST_ID = 3;
+ /**
+ * list entry to create a new list
+ */
+ public static final AbstractList NEW_LIST = new PseudoList(NEW_LIST_ID, R.string.list_menu_create);
+
+ /**
+ * private constructor to have all instances as constants in the class
+ */
+ private PseudoList(int id, final int titleResourceId) {
super(id, CgeoApplication.getInstance().getResources().getString(titleResourceId));
}
@@ -17,4 +29,9 @@ public class PseudoList extends AbstractList {
return "<" + title + ">";
}
+ @Override
+ public boolean isConcrete() {
+ return false;
+ }
+
}