Bug 58667 - Make HSSFRow, XSSFRow, and SXSSFRow implement Comparable interface
Summary: Make HSSFRow, XSSFRow, and SXSSFRow implement Comparable interface
Alias: None
Product: POI
Classification: Unclassified
Component: SS Common (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2015-11-29 12:02 UTC by Javen O'Neal
Modified: 2015-11-29 12:20 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Javen O'Neal 2015-11-29 12:02:47 UTC
Currently XSSFRow implements the Comparable<XSSFRow> interface, HSSFRow doesn't declare that it implements a Comparable interface but has a compareTo(Object) method, and SXSSFRow does neither.

For consistency, all three should implement a Comparable interface. To avoid Java generics craziness, the Row interface will NOT be required to extend Comparable<Row>.
Comment 1 Javen O'Neal 2015-11-29 12:20:09 UTC
Added in r1717054, updated docs in r1717055.

Also changed HSSFRow.hashCode implementation to return a value, which is needed if HSSFRow.toString() is not overridden.