/** * Returns row index of a row in the sheet that contains this cell * * @return zero-based row index of a row in the sheet that contains this cell */ @Override public int getRowIndex() { return _row.getRowNum(); }
/** * Compares two <code>SXSSFRow</code> objects. Two rows are equal if they belong to the same worksheet and * their row indexes are equal. * * @param other the <code>SXSSFRow</code> to be compared. * @return <ul> * <li> * the value <code>0</code> if the row number of this <code>SXSSFRow</code> is * equal to the row number of the argument <code>SXSSFRow</code> * </li> * <li> * a value less than <code>0</code> if the row number of this this <code>SXSSFRow</code> is * numerically less than the row number of the argument <code>SXSSFRow</code> * </li> * <li> * a value greater than <code>0</code> if the row number of this this <code>SXSSFRow</code> is * numerically greater than the row number of the argument <code>SXSSFRow</code> * </li> * </ul> * @throws IllegalArgumentException if the argument row belongs to a different worksheet */ @Override public int compareTo(SXSSFRow other) { if (this.getSheet() != other.getSheet()) { throw new IllegalArgumentException("The compared rows must belong to the same sheet"); } int thisRow = this.getRowNum(); int otherRow = other.getRowNum(); return Integer.compare(thisRow, otherRow); }
/** * Returns row index of a row in the sheet that contains this cell * * @return zero-based row index of a row in the sheet that contains this cell */ public int getRowIndex() { return _row.getRowNum(); }
/** * Returns row index of a row in the sheet that contains this cell * * @return zero-based row index of a row in the sheet that contains this cell */ @Override public int getRowIndex() { return _row.getRowNum(); }
/** * Compares two <code>SXSSFRow</code> objects. Two rows are equal if they belong to the same worksheet and * their row indexes are equal. * * @param other the <code>SXSSFRow</code> to be compared. * @return <ul> * <li> * the value <code>0</code> if the row number of this <code>SXSSFRow</code> is * equal to the row number of the argument <code>SXSSFRow</code> * </li> * <li> * a value less than <code>0</code> if the row number of this this <code>SXSSFRow</code> is * numerically less than the row number of the argument <code>SXSSFRow</code> * </li> * <li> * a value greater than <code>0</code> if the row number of this this <code>SXSSFRow</code> is * numerically greater than the row number of the argument <code>SXSSFRow</code> * </li> * </ul> * @throws IllegalArgumentException if the argument row belongs to a different worksheet */ @Override public int compareTo(SXSSFRow other) { if (this.getSheet() != other.getSheet()) { throw new IllegalArgumentException("The compared rows must belong to the same sheet"); } int thisRow = this.getRowNum(); int otherRow = other.getRowNum(); return Integer.compare(thisRow, otherRow); }