diff --git a/library/src/main/java/com/hannesdorfmann/adapterdelegates4/AbsDelegationAdapter.java b/library/src/main/java/com/hannesdorfmann/adapterdelegates4/AbsDelegationAdapter.java index e08fe7f..43b47e5 100644 --- a/library/src/main/java/com/hannesdorfmann/adapterdelegates4/AbsDelegationAdapter.java +++ b/library/src/main/java/com/hannesdorfmann/adapterdelegates4/AbsDelegationAdapter.java @@ -21,6 +21,7 @@ import java.util.List; import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import androidx.recyclerview.widget.RecyclerView; /** @@ -58,7 +59,7 @@ public abstract class AbsDelegationAdapter extends RecyclerView.Adapter { protected AdapterDelegatesManager delegatesManager; - protected T items; + @Nullable protected T items; public AbsDelegationAdapter() { this(new AdapterDelegatesManager()); @@ -128,6 +129,7 @@ public void onViewDetachedFromWindow(@NonNull RecyclerView.ViewHolder holder) { * * @return The items / data source */ + @Nullable public T getItems() { return items; } @@ -137,7 +139,7 @@ public T getItems() { * * @param items The items / data source */ - public void setItems(T items) { + public void setItems(@Nullable T items) { this.items = items; } }