public HSSFCell getCell(int cellnum, MissingCellPolicy policy) {HSSFCell cell = retrieveCell(cellnum);switch (policy) {case RETURN_NULL_AND_BLANK:return cell;case RETURN_BLANK_AS_NULL:boolean isBlank = (cell != null && cell.getCellType() == CellType.BLANK);return (isBlank) ? null : cell;case CREATE_NULL_AS_BLANK:return (cell == null) ? createCell(cellnum, CellType.BLANK) : cell;default:throw new IllegalArgumentException("Illegal policy " + policy);}}
public ICell GetCell(int cellnum, MissingCellPolicy policy){ICell cell = RetrieveCell(cellnum);if (policy == MissingCellPolicy.RETURN_NULL_AND_BLANK){return cell;}if (policy == MissingCellPolicy.RETURN_BLANK_AS_NULL){if (cell == null) return cell;if (cell.CellType == CellType.Blank){return null;}return cell;}if (policy == MissingCellPolicy.CREATE_NULL_AS_BLANK){if (cell == null){return CreateCell(cellnum, CellType.Blank);}return cell;}throw new ArgumentException("Illegal policy " + policy + " (" + policy.id + ")");}