-
public final class FirebaseRecyclerOptions.Builder<T>Builder for a FirebaseRecyclerOptions.
-
-
Method Summary
Modifier and Type Method Description FirebaseRecyclerOptions.Builder<T>setSnapshotArray(@NonNull() ObservableSnapshotArray<T> snapshots)Directly set the ObservableSnapshotArray to be listened to. FirebaseRecyclerOptions.Builder<T>setQuery(@NonNull() Query query, @NonNull() SnapshotParser<T> snapshotParser)Set the Firebase query to listen to, along with a SnapshotParser to parsesnapshots into model objects. FirebaseRecyclerOptions.Builder<T>setQuery(@NonNull() Query query, @NonNull() Class<T> modelClass)Set the Firebase query to listen to, along with a Class to which snapshots shouldbe parsed. FirebaseRecyclerOptions.Builder<T>setIndexedQuery(@NonNull() Query keyQuery, @NonNull() DatabaseReference dataRef, @NonNull() SnapshotParser<T> snapshotParser)Set an indexed Firebase query to listen to, along with a SnapshotParser to parsesnapshots into model objects. FirebaseRecyclerOptions.Builder<T>setIndexedQuery(@NonNull() Query keyQuery, @NonNull() DatabaseReference dataRef, @NonNull() Class<T> modelClass)Set an indexed Firebase query to listen to, along with a Class to which snapshotsshould be parsed. FirebaseRecyclerOptions.Builder<T>setLifecycleOwner(@Nullable() LifecycleOwner owner)Set the (optional) LifecycleOwner. FirebaseRecyclerOptions<T>build()Build a FirebaseRecyclerOptions from the provided arguments. -
-
Method Detail
-
setSnapshotArray
@NonNull() FirebaseRecyclerOptions.Builder<T> setSnapshotArray(@NonNull() ObservableSnapshotArray<T> snapshots)
Directly set the ObservableSnapshotArray to be listened to.
Do not call this method after calling
{@code setQuery}.
-
setQuery
@NonNull() FirebaseRecyclerOptions.Builder<T> setQuery(@NonNull() Query query, @NonNull() SnapshotParser<T> snapshotParser)
Set the Firebase query to listen to, along with a SnapshotParser to parsesnapshots into model objects.
Do not call this method after calling setSnapshotArray.
-
setQuery
@NonNull() FirebaseRecyclerOptions.Builder<T> setQuery(@NonNull() Query query, @NonNull() Class<T> modelClass)
Set the Firebase query to listen to, along with a Class to which snapshots shouldbe parsed.
Do not call this method after calling setSnapshotArray.
-
setIndexedQuery
@NonNull() FirebaseRecyclerOptions.Builder<T> setIndexedQuery(@NonNull() Query keyQuery, @NonNull() DatabaseReference dataRef, @NonNull() SnapshotParser<T> snapshotParser)
Set an indexed Firebase query to listen to, along with a SnapshotParser to parsesnapshots into model objects. Keys are identified by the
{@code keyQuery}and then datais fetched using those keys from the{@code dataRef}.Do not call this method after calling setSnapshotArray.
-
setIndexedQuery
@NonNull() FirebaseRecyclerOptions.Builder<T> setIndexedQuery(@NonNull() Query keyQuery, @NonNull() DatabaseReference dataRef, @NonNull() Class<T> modelClass)
Set an indexed Firebase query to listen to, along with a Class to which snapshotsshould be parsed. Keys are identified by the
{@code keyQuery}and then data is fetchedusing those keys from the{@code dataRef}.Do not call this method after calling setSnapshotArray.
-
setLifecycleOwner
@NonNull() FirebaseRecyclerOptions.Builder<T> setLifecycleOwner(@Nullable() LifecycleOwner owner)
Set the (optional) LifecycleOwner. Listens will start and stop after theappropriate lifecycle events.
-
build
@NonNull() FirebaseRecyclerOptions<T> build()
Build a FirebaseRecyclerOptions from the provided arguments.
-
-
-
-