@Test public void testExtractCellValue() { final int rowIndex = 123; final int columnIndex = 456; final GridCellValue gridCellValue = mock(GridCellValue.class); final GridCell gridCell = mock(GridCell.class); final GridData gridData = mock(GridData.class); final GridWidget gridWidget = mock(GridWidget.class); final GridCellTuple cellTuple = new GridCellTuple(rowIndex, columnIndex, gridWidget); doReturn(gridData).when(gridWidget).getModel(); doReturn(gridCell).when(gridData).getCell(rowIndex, columnIndex); doReturn(gridCellValue).when(gridCell).getValue(); Assertions.assertThat(CommandUtils.extractGridCellValue(cellTuple)).hasValue(gridCellValue); }
public static Optional<GridCellValue<?>> extractGridCellValue(final GridCellTuple cellTuple) { final GridCell<?> cell = cellTuple.getGridWidget().getModel().getCell(cellTuple.getRowIndex(), cellTuple.getColumnIndex()); return Optional.ofNullable(cell == null ? null : cell.getValue()); }
CommandUtils { public static Optional<GridCellValue<?>> extractGridCellValue(final GridCellTuple cellTuple) { final GridCell<?> cell = cellTuple.getGridWidget().getModel().getCell(cellTuple.getRowIndex(), cellTuple.getColumnIndex()); return Optional.ofNullable(cell == null ? null : cell.getValue()); } }
CommandUtils { public static Optional<GridCellValue<?>> extractGridCellValue(final GridCellTuple cellTuple) { final GridCell<?> cell = cellTuple.getGridWidget().getModel().getCell(cellTuple.getRowIndex(), cellTuple.getColumnIndex()); return Optional.ofNullable(cell == null ? null : cell.getValue()); }  }
CommandUtils { public static Optional<GridCellValue<?>> extractGridCellValue(final GridCellTuple cellTuple) { final GridCell<?> cell = cellTuple.getGridWidget().getModel().getCell(cellTuple.getRowIndex(), cellTuple.getColumnIndex()); return Optional.ofNullable(cell == null ? null : cell.getValue()); }  static void updateRowNumbers(final GridData uiModel,
                                        final IntStream rangeOfRowsToUpdate); static void moveRows(final List<T> allRows,
                                    final List<T> rowsToMove,
                                    final int index); static void moveComponentWidths(final int index,
                                           final int oldIndex,
                                           final List<Double> componentWidths,
                                           final List<Integer> uiColumnIndexes); static void updateParentInformation(final GridData uiModel); static Optional<GridCellValue<?>> extractGridCellValue(final GridCellTuple cellTuple); }
CommandUtils { public static Optional<GridCellValue<?>> extractGridCellValue(final GridCellTuple cellTuple) { final GridCell<?> cell = cellTuple.getGridWidget().getModel().getCell(cellTuple.getRowIndex(), cellTuple.getColumnIndex()); return Optional.ofNullable(cell == null ? null : cell.getValue()); }  static void updateRowNumbers(final GridData uiModel,
                                        final IntStream rangeOfRowsToUpdate); static void moveRows(final List<T> allRows,
                                    final List<T> rowsToMove,
                                    final int index); static void moveComponentWidths(final int index,
                                           final int oldIndex,
                                           final List<Double> componentWidths,
                                           final List<Integer> uiColumnIndexes); static void updateParentInformation(final GridData uiModel); static Optional<GridCellValue<?>> extractGridCellValue(final GridCellTuple cellTuple);  }