/** * Constructs a MultiTypeAdapter with a items list. * * @param items the items list */ public MultiTypeAdapter(@NonNull List<?> items) { this(items, new MultiTypePool()); }
/** * Constructs a MultiTypeAdapter with a items list and an initial capacity of TypePool. * * @param items the items list * @param initialCapacity the initial capacity of TypePool */ public MultiTypeAdapter(@NonNull List<?> items, int initialCapacity) { this(items, new MultiTypePool(initialCapacity)); }
@Before public void register() { pool = new MultiTypePool(); pool.register(TestItem.class, new TestItemViewBinder(), new DefaultLinker<TestItem>()); pool.register(RegisteredSubClass.class, new TestItemViewBinder(), new DefaultLinker<TestItem>()); }