package cgeo.geocaching.filter;

import cgeo.geocaching.cgCache;
import cgeo.geocaching.cgWaypoint;

public class ModifiedFilter extends AbstractFilter {

    public ModifiedFilter(String name) {
        super(name);
    }

    @Override
    public boolean accepts(final cgCache cache) {
        // modified on GC
        if (cache.hasUserModifiedCoords()) {
            return true;
        }

        // or with added/modified waypoints
        for (cgWaypoint waypoint : cache.getWaypoints()) {
            if (waypoint.isUserDefined()) {
                return true;
            }
        }

        return false;
    }
}

@@ -61,43 +61,8 @@
 che;
-%0Aimport cgeo.geocaching.cgWaypoint;
 %0A%0Apu
@@ -280,20 +280,23 @@
         
-if (
+return 
 cache.ha
@@ -320,269 +320,35 @@
 ds()
-) %7B%0A            return true;%0A        %7D%0A%0A        // or with added/modified waypoints%0A        for (cgWaypoint waypoint : cache.getWaypoints()) %7B%0A            if (waypoint.isUserDefined()) %7B%0A                return true;%0A            %7D%0A        %7D%0A%0A        return false
+ %7C%7C cache.hasFinalDefined()
 ;%0A  

refactor #1002: use only flags available at cache