@SuppressWarnings("unchecked") @Test public void testSimpleBindHolder() { final TestAdapter adapter = new TestAdapter(); final TestHolder holder = new TestHolder(new TextView(context)); final AdapterHolder.Binder<AdapterHolder.ItemAdapter, ViewHolder> binder = ViewHolderBinders.simple(); for (int i = 0; i < 10; i++) { holder.updateAdapterPosition(i); binder.bindHolder(adapter, holder, i, Collections.EMPTY_LIST); assertThat(((TextView) holder.itemView).getText().toString(), is("Item at: " + i)); } }
@NonNull public static <A extends AdapterHolder.ItemAdapter, VH extends ViewHolder> AdapterHolder.Binder<A, VH> simple() { return new Simple<>(); }
ViewHolderBinders { @NonNull public static <A extends AdapterHolder.ItemAdapter, VH extends ViewHolder> AdapterHolder.Binder<A, VH> simple() { return new Simple<>(); } }
ViewHolderBinders { @NonNull public static <A extends AdapterHolder.ItemAdapter, VH extends ViewHolder> AdapterHolder.Binder<A, VH> simple() { return new Simple<>(); } private  ViewHolderBinders(); }
ViewHolderBinders { @NonNull public static <A extends AdapterHolder.ItemAdapter, VH extends ViewHolder> AdapterHolder.Binder<A, VH> simple() { return new Simple<>(); } private  ViewHolderBinders(); @NonNull static AdapterHolder.Binder<A, VH> simple(); @NonNull static AdapterHolder.Binder<A, VH> binding(); }
ViewHolderBinders { @NonNull public static <A extends AdapterHolder.ItemAdapter, VH extends ViewHolder> AdapterHolder.Binder<A, VH> simple() { return new Simple<>(); } private  ViewHolderBinders(); @NonNull static AdapterHolder.Binder<A, VH> simple(); @NonNull static AdapterHolder.Binder<A, VH> binding();  }