@MainThread public class DatasourceOwner<E> extends Object implements DatasourceSwappable<E>
| Constructor and Description |
|---|
DatasourceOwner(DatasourceProxy<E> datasource,
DatasourceObserver datasourceObserver) |
| Modifier and Type | Method and Description |
|---|---|
Datasource<? extends E> |
getDatasource() |
void |
onAttachedToRecyclerView(RecyclerView recyclerView) |
void |
onDetachedFromRecyclerView(RecyclerView recyclerView) |
Datasource<? extends E> |
swap(Datasource<? extends E> datasource)
Performs swapping the internal components and returns the previous component.
|
public DatasourceOwner(@NonNull DatasourceProxy<E> datasource, @NonNull DatasourceObserver datasourceObserver)
@NonNull public Datasource<? extends E> getDatasource()
@Nullable public Datasource<? extends E> swap(@NonNull Datasource<? extends E> datasource)
Swappableswap in interface Swappable<Datasource<? extends E>>datasource - The new component that should replace the old one.public void onAttachedToRecyclerView(RecyclerView recyclerView)
public void onDetachedFromRecyclerView(RecyclerView recyclerView)