aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/cgCache.java
diff options
context:
space:
mode:
authorMarco Jacob <mjacob@union06.de>2012-01-23 20:38:07 +0100
committerMarco Jacob <mjacob@union06.de>2012-01-23 20:38:07 +0100
commit8a1ae488a9f28bb00d2297a5d2fa27db73298f3d (patch)
tree0b448103ab14095b80cee971dfe4b3949c155b84 /main/src/cgeo/geocaching/cgCache.java
parent77ab71551adec6644026fb656e493ba04fb11050 (diff)
downloadcgeo-8a1ae488a9f28bb00d2297a5d2fa27db73298f3d.zip
cgeo-8a1ae488a9f28bb00d2297a5d2fa27db73298f3d.tar.gz
cgeo-8a1ae488a9f28bb00d2297a5d2fa27db73298f3d.tar.bz2
added getWaypointById(int)
Diffstat (limited to 'main/src/cgeo/geocaching/cgCache.java')
-rw-r--r--main/src/cgeo/geocaching/cgCache.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/cgCache.java b/main/src/cgeo/geocaching/cgCache.java
index fe15c41..e1cf878 100644
--- a/main/src/cgeo/geocaching/cgCache.java
+++ b/main/src/cgeo/geocaching/cgCache.java
@@ -1153,6 +1153,19 @@ public class cgCache implements ICache {
return waypoints.get(index);
}
+ /**
+ * @param index
+ * @return waypoint or <code>null</code>
+ */
+ public cgWaypoint getWaypointById(int id) {
+ for (cgWaypoint waypoint : waypoints) {
+ if (waypoint.getId() == id) {
+ return waypoint;
+ }
+ }
+ return null;
+ }
+
public void parseWaypointsFromNote() {
try {
if (StringUtils.isBlank(getPersonalNote())) {