From 087f90fbb50796ae15c84ab6e321f5ddf8dceeec Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Sun, 1 Apr 2012 16:48:50 +0200 Subject: Refactoring: use IWaypoint and cgCache instead of cgCoord object Most of the time, the cgCoord is built from an existing cache or from an existing waypoint. And most of the time, using the IWaypoint interface is fine. We can see a cache as being a waypoint as well, so by making it implement IWaypoint we can manipulate IWaypoint objects every time we were manipulating cgCoord ones without copying. After this refactoring, cgCoord was only used to hold some partial cache information. cgCache can be used instead, and cgCoord is not needed anymore. --- main/src/cgeo/geocaching/IWaypoint.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'main/src/cgeo/geocaching/IWaypoint.java') diff --git a/main/src/cgeo/geocaching/IWaypoint.java b/main/src/cgeo/geocaching/IWaypoint.java index 870fb12..3e26052 100644 --- a/main/src/cgeo/geocaching/IWaypoint.java +++ b/main/src/cgeo/geocaching/IWaypoint.java @@ -18,4 +18,6 @@ public interface IWaypoint extends ILogable { public abstract WaypointType getWaypointType(); + public abstract String getCoordType(); + } -- cgit v1.1