@SuppressWarnings("ConstantConditions") @Test public void testGetHeader() { final TestModule module = new TestModule(); final int headersCount = 10; for (int i = 0; i < headersCount; i++) { module.putHeader(i, createTestHeader("Header for: " + i)); } for (int i = 0; i < headersCount; i++) { final HeadersModule.Header header = module.getHeader(i); assertThat(header, is(not(nullValue()))); assertThat(header.getText(), Is.<CharSequence>is("Header for: " + i)); } }
@Nullable public H getHeader(final int position) { return headers.get(position); }
HeadersModule extends AdapterModule { @Nullable public H getHeader(final int position) { return headers.get(position); } }
HeadersModule extends AdapterModule { @Nullable public H getHeader(final int position) { return headers.get(position); }  }
HeadersModule extends AdapterModule { @Nullable public H getHeader(final int position) { return headers.get(position); }  boolean isEmpty(); int size(); boolean isHeaderAt(final int position); @Nullable H getHeader(final int position); @NonNull SparseArray<H> getHeaders(); void clearHeaders(); int correctPosition(final int position); int countHeadersBeforePosition(final int position); void setHeaderStyleAttr(@AttrRes final int styleAttr); @AttrRes int getHeaderStyleAttr(); @NonNull abstract VH createViewHolder(@NonNull ViewGroup parent, int viewType); @NonNull final SimpleHeaderHolder createSimpleHeaderHolder(@NonNull ViewGroup parent); abstract void bindViewHolder(@NonNull VH viewHolder, int position); }
HeadersModule extends AdapterModule { @Nullable public H getHeader(final int position) { return headers.get(position); }  boolean isEmpty(); int size(); boolean isHeaderAt(final int position); @Nullable H getHeader(final int position); @NonNull SparseArray<H> getHeaders(); void clearHeaders(); int correctPosition(final int position); int countHeadersBeforePosition(final int position); void setHeaderStyleAttr(@AttrRes final int styleAttr); @AttrRes int getHeaderStyleAttr(); @NonNull abstract VH createViewHolder(@NonNull ViewGroup parent, int viewType); @NonNull final SimpleHeaderHolder createSimpleHeaderHolder(@NonNull ViewGroup parent); abstract void bindViewHolder(@NonNull VH viewHolder, int position);  }