JDK-6410729 : Add BitSet.previousClearBit, previousSetBit
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,linux,windows_xp
  • CPU: generic,x86
  • Submitted: 2006-04-10
  • Updated: 2017-05-16
  • Resolved: 2011-03-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 Other
7 b20Fixed OpenJDK6Fixed
Related Reports
Duplicate :  
Description
Josh Bloch writes,

"In 1.4, we added methods nextSetBit(int) and nextClearBit(int).  This was good as far as it went.  We should also have added previousSetBit(int) and previousClearBit(int).  

The reason this is a reasonable RFE is that it's MUCH slower to code these methods up from the outside as you don't have access to the words that make up bit set, so you have to operate a bit at a time, range-checking the bit index each time.  The resulting method is probably 100 times as slow as it should be.  (I haven't timed it, so don't believe this estimate.)"

Comments
EVALUATION A reasonable suggestion
10-04-2006