@Test public void contains_itemPresentedInDataSet_itemFound() { Grid<String> grid = new Grid<>(); GridListDataView<String> dataView = grid .setItems("first", "middle", "last"); Assert.assertTrue("The item was not found in the data", dataView.contains("first")); dataView.setIdentifierProvider(item -> item.substring(0, 1)); Assert.assertTrue("The item was not found in the data", dataView.contains("fourth")); }
@Override public void setIdentifierProvider( IdentifierProvider<T> identifierProvider) { super.setIdentifierProvider(identifierProvider); dataCommunicator.getKeyMapper().setIdentifierGetter(identifierProvider); }
GridListDataView extends AbstractListDataView<T> { @Override public void setIdentifierProvider( IdentifierProvider<T> identifierProvider) { super.setIdentifierProvider(identifierProvider); dataCommunicator.getKeyMapper().setIdentifierGetter(identifierProvider); } }
GridListDataView extends AbstractListDataView<T> { @Override public void setIdentifierProvider( IdentifierProvider<T> identifierProvider) { super.setIdentifierProvider(identifierProvider); dataCommunicator.getKeyMapper().setIdentifierGetter(identifierProvider); } GridListDataView(DataCommunicator<T> dataCommunicator,
                            Grid<T> grid); }
GridListDataView extends AbstractListDataView<T> { @Override public void setIdentifierProvider( IdentifierProvider<T> identifierProvider) { super.setIdentifierProvider(identifierProvider); dataCommunicator.getKeyMapper().setIdentifierGetter(identifierProvider); } GridListDataView(DataCommunicator<T> dataCommunicator,
                            Grid<T> grid); @Override Stream<T> getItems(); @Override int getItemCount(); @Override void setIdentifierProvider(
            IdentifierProvider<T> identifierProvider); }
GridListDataView extends AbstractListDataView<T> { @Override public void setIdentifierProvider( IdentifierProvider<T> identifierProvider) { super.setIdentifierProvider(identifierProvider); dataCommunicator.getKeyMapper().setIdentifierGetter(identifierProvider); } GridListDataView(DataCommunicator<T> dataCommunicator,
                            Grid<T> grid); @Override Stream<T> getItems(); @Override int getItemCount(); @Override void setIdentifierProvider(
            IdentifierProvider<T> identifierProvider);  }