@Test(expected = WrongItemException.class) public void addWrongBuilder() { UniversalAdapter adapter = new UniversalAdapter(mBuilder1, mBuilder2); adapter.add(0, new Model1(), SECOND_BUILDER_ID); }
public void add(int pos, ViewModelWrapper wrapper) { if (wrapper != null) { mItems.add(pos, wrapper); } }
UniversalAdapter extends RecyclerView.Adapter<DefaultViewHolder> { public void add(int pos, ViewModelWrapper wrapper) { if (wrapper != null) { mItems.add(pos, wrapper); } } }
UniversalAdapter extends RecyclerView.Adapter<DefaultViewHolder> { public void add(int pos, ViewModelWrapper wrapper) { if (wrapper != null) { mItems.add(pos, wrapper); } } UniversalAdapter(Builder... builders);  UniversalAdapter(List<Builder> builders); }
UniversalAdapter extends RecyclerView.Adapter<DefaultViewHolder> { public void add(int pos, ViewModelWrapper wrapper) { if (wrapper != null) { mItems.add(pos, wrapper); } } UniversalAdapter(Builder... builders);  UniversalAdapter(List<Builder> builders); @Override @NonNull DefaultViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType); @SuppressWarnings("unchecked") @Override void onBindViewHolder(@NonNull DefaultViewHolder holder, int position); @Override int getItemViewType(int position); @Override int getItemCount(); int getItemCount(Class itemClass); void add(int pos, ViewModelWrapper wrapper); void replace(int index, Object item, int holderId); void replace(int index, Object item); boolean add(ViewModelWrapper wrapper); void add(Object item, int builderId); boolean add(Object item); boolean add(int index, Object item); void add(int index, Object item, int builderId); Object getItem(int position); void addAll(List items); void addAll(List items, int builderId); void replaceAll(List items); void replaceAll(List items, int builderId); void addAllWrappers(List<ViewModelWrapper> items); void replaceAllWrappers(List<ViewModelWrapper> elements); void removeItems(int startIndex, int endIndex); boolean clear(); int indexOf(Object searchItem); }
UniversalAdapter extends RecyclerView.Adapter<DefaultViewHolder> { public void add(int pos, ViewModelWrapper wrapper) { if (wrapper != null) { mItems.add(pos, wrapper); } } UniversalAdapter(Builder... builders);  UniversalAdapter(List<Builder> builders); @Override @NonNull DefaultViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType); @SuppressWarnings("unchecked") @Override void onBindViewHolder(@NonNull DefaultViewHolder holder, int position); @Override int getItemViewType(int position); @Override int getItemCount(); int getItemCount(Class itemClass); void add(int pos, ViewModelWrapper wrapper); void replace(int index, Object item, int holderId); void replace(int index, Object item); boolean add(ViewModelWrapper wrapper); void add(Object item, int builderId); boolean add(Object item); boolean add(int index, Object item); void add(int index, Object item, int builderId); Object getItem(int position); void addAll(List items); void addAll(List items, int builderId); void replaceAll(List items); void replaceAll(List items, int builderId); void addAllWrappers(List<ViewModelWrapper> items); void replaceAllWrappers(List<ViewModelWrapper> elements); void removeItems(int startIndex, int endIndex); boolean clear(); int indexOf(Object searchItem);  }