@Test public void testSetSelection() { final SelectionModule module = new SelectionModule(); module.setSelection(SELECTION_LIST); final List<Long> selection = module.getSelection(); assertThat(selection, is(notNullValue())); assertThat(selection.size(), is(SELECTION_ARRAY.length)); for (int i = 0; i < SELECTION_ARRAY.length; i++) { assertThat(selection.get(i), is(SELECTION_ARRAY[i])); } }
public void setSelection(@Nullable final List<Long> selection) { this.selection = selection == null ? null : new ArrayList<>(selection); }
SelectionModule extends AdapterModule { public void setSelection(@Nullable final List<Long> selection) { this.selection = selection == null ? null : new ArrayList<>(selection); } }
SelectionModule extends AdapterModule { public void setSelection(@Nullable final List<Long> selection) { this.selection = selection == null ? null : new ArrayList<>(selection); }  }
SelectionModule extends AdapterModule { public void setSelection(@Nullable final List<Long> selection) { this.selection = selection == null ? null : new ArrayList<>(selection); }  void setMode(@SelectionMode final int mode); @SelectionMode int getMode(); int toggleSelection(final long id); void setSelected(final long id, final boolean selected); void selectAll(); void selectRange(final int startPosition, final int count); void setSelection(@Nullable final List<Long> selection); boolean isSelected(final long id); @NonNull List<Long> getSelection(); int getSelectionSize(); void clearSelection(); void clearSelectionInRange(final int startPosition, final int count); @Override boolean requiresStateSaving(); @Override @CallSuper @NonNull Parcelable saveInstanceState(); @Override @CallSuper void restoreInstanceState(@NonNull final Parcelable savedState); }
SelectionModule extends AdapterModule { public void setSelection(@Nullable final List<Long> selection) { this.selection = selection == null ? null : new ArrayList<>(selection); }  void setMode(@SelectionMode final int mode); @SelectionMode int getMode(); int toggleSelection(final long id); void setSelected(final long id, final boolean selected); void selectAll(); void selectRange(final int startPosition, final int count); void setSelection(@Nullable final List<Long> selection); boolean isSelected(final long id); @NonNull List<Long> getSelection(); int getSelectionSize(); void clearSelection(); void clearSelectionInRange(final int startPosition, final int count); @Override boolean requiresStateSaving(); @Override @CallSuper @NonNull Parcelable saveInstanceState(); @Override @CallSuper void restoreInstanceState(@NonNull final Parcelable savedState); static final int SINGLE; static final int MULTIPLE; }