class PivotUtils {

    static boolean cellValueEquals(Cell cell, Cell other) {

        if (cell != null && other != null && cell.getCellType() == other.getCellType()) {

            switch (cell.getCellType()) {
                case BLANK:
                    if (other.getCellType()==CellType.BLANK) {
                        return true;
                    }
                    break;
                case BOOLEAN:
                    if (cell.getBooleanCellValue() == other.getBooleanCellValue()){
                        return true;
                    }
                    break;
                case ERROR:
                    if (cell.getErrorCellValue() == other.getErrorCellValue()){
                        return true;
                    }
                    break;
                case FORMULA:
                    break;
                case NUMERIC:
                    if (cell.getNumericCellValue() == other.getNumericCellValue()){
                        return true;
                    }
                    break;
                case STRING:
                    if (cell.getStringCellValue().equals(other.getStringCellValue())){
                        return true;
                    }
            }
        }

        return  false;
    }

}