private <T> Map<String, T> getAllFromContext(final Func1<Bundle, T> getter) {
        final Map<String, T> result = new HashMap<>();
        synchronized (this.connectorContext) {
            for (String key : this.connectorContext.keySet()) {
                final Bundle b = this.connectorContext.getBundle(key);
                final T value = getter.call(b);
                if (value != null) {
                    result.put(key, value);
                }
            }
        }
        return result;
    }
Build a search result from a collection of caches.

@param caches the non-null collection of caches to include
main/src/main/java/cgeo/geocaching/SearchResult.java