@NonNull
    private static <T, U extends Collection<? super T>> U queryToColl(@NonNull final String table,
                                                                      final String[] columns,
                                                                      final String selection,
                                                                      final String[] selectionArgs,
                                                                      final String orderBy,
                                                                      final String limit,
                                                                      final U result,
                                                                      final Func1<? super Cursor, ? extends T> func) {
        return withAccessLock(() -> {
            init();
            final Cursor cursor = database.query(table, columns, selection, selectionArgs, null, null, orderBy, limit);
            return cursorToColl(cursor, result, func);
        });
    }
Number of caches stored for a given type and/or list
main/src/main/java/cgeo/geocaching/storage/DataStore.java