Revert "Convert ThreadDatabase to kotlin."

This reverts commit 1e88fb428d.
This commit is contained in:
Greyson Parrelli
2022-10-27 16:36:12 -04:00
parent 6f46e9000b
commit 906441c90c
6 changed files with 1964 additions and 1765 deletions

View File

@@ -104,4 +104,12 @@ public final class CursorUtil {
return row.toString();
}
public static @Nullable <T> T getAggregateOrDefault(@NonNull Cursor cursor, @Nullable T defaultValue, @NonNull Function<Integer, T> cursorColumnFn) {
if (cursor.moveToFirst()) {
return cursorColumnFn.apply(0);
} else {
return defaultValue;
}
}
}