/** * @see org.apache.poi.ss.usermodel.Table#contains(org.apache.poi.ss.usermodel.Cell) * @since 3.17 beta 1 */ public boolean contains(CellReference cell) { if (cell == null) return false; // check if cell is on the same sheet as the table if ( ! getSheetName().equals(cell.getSheetName())) return false; // check if the cell is inside the table if (cell.getRow() >= getStartRowIndex() && cell.getRow() <= getEndRowIndex() && cell.getCol() >= getStartColIndex() && cell.getCol() <= getEndColIndex()) { return true; } return false; }
/** * @see org.apache.poi.ss.usermodel.Table#contains(org.apache.poi.ss.usermodel.Cell) * @since 3.17 beta 1 */ public boolean contains(CellReference cell) { if (cell == null) return false; // check if cell is on the same sheet as the table if ( ! getSheetName().equals(cell.getSheetName())) return false; // check if the cell is inside the table if (cell.getRow() >= getStartRowIndex() && cell.getRow() <= getEndRowIndex() && cell.getCol() >= getStartColIndex() && cell.getCol() <= getEndColIndex()) { return true; } return false; }