@Nullable
    public Waypoint getFirstMatchingWaypoint(final Func1<Waypoint, Boolean> condition) {
        for (final Waypoint wpt : waypoints) {
            if (wpt != null && condition.call(wpt)) {
                return wpt;
            }
        }
        return null;
    }
Returns the first found Waypoint matching the given condition
main/src/main/java/cgeo/geocaching/models/Geocache.java