@Test(expected = IllegalArgumentException.class) public void onBindViewHolder_BinderDoesNotExists_Should_ThrowIllegalArgumentException() { adapter.onBindViewHolder(emptyViewHolder, NON_EXISTING_BINDER_ITEM_POSITION); }
@Override public void onBindViewHolder(@NonNull EmptyViewHolder emptyViewHolder, int position) { Item item = items.get(position); Witch.bind(getBinder(item).take(item), emptyViewHolder.itemView); }
WitchRecyclerViewAdapter extends RecyclerView.Adapter<EmptyViewHolder> { @Override public void onBindViewHolder(@NonNull EmptyViewHolder emptyViewHolder, int position) { Item item = items.get(position); Witch.bind(getBinder(item).take(item), emptyViewHolder.itemView); } }
WitchRecyclerViewAdapter extends RecyclerView.Adapter<EmptyViewHolder> { @Override public void onBindViewHolder(@NonNull EmptyViewHolder emptyViewHolder, int position) { Item item = items.get(position); Witch.bind(getBinder(item).take(item), emptyViewHolder.itemView); } WitchRecyclerViewAdapter(List<Item> items, List<Binder<? extends Item>> binders);  WitchRecyclerViewAdapter(List<Binder<? extends Item>> binders); }
WitchRecyclerViewAdapter extends RecyclerView.Adapter<EmptyViewHolder> { @Override public void onBindViewHolder(@NonNull EmptyViewHolder emptyViewHolder, int position) { Item item = items.get(position); Witch.bind(getBinder(item).take(item), emptyViewHolder.itemView); } WitchRecyclerViewAdapter(List<Item> items, List<Binder<? extends Item>> binders);  WitchRecyclerViewAdapter(List<Binder<? extends Item>> binders); @Override int getItemViewType(int position); @Override @NonNull EmptyViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int viewType); @Override void onBindViewHolder(@NonNull EmptyViewHolder emptyViewHolder, int position); @Override int getItemCount(); List<Item> getItems(); void setItems(List<Item> items); }
WitchRecyclerViewAdapter extends RecyclerView.Adapter<EmptyViewHolder> { @Override public void onBindViewHolder(@NonNull EmptyViewHolder emptyViewHolder, int position) { Item item = items.get(position); Witch.bind(getBinder(item).take(item), emptyViewHolder.itemView); } WitchRecyclerViewAdapter(List<Item> items, List<Binder<? extends Item>> binders);  WitchRecyclerViewAdapter(List<Binder<? extends Item>> binders); @Override int getItemViewType(int position); @Override @NonNull EmptyViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int viewType); @Override void onBindViewHolder(@NonNull EmptyViewHolder emptyViewHolder, int position); @Override int getItemCount(); List<Item> getItems(); void setItems(List<Item> items);  }