United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6410729 : Add BitSet.previousClearBit, previousSetBit

Details
Type:
Enhancement
Submit Date:
2006-04-10
Status:
Closed
Updated Date:
2017-05-16
Project Name:
JDK
Resolved Date:
2011-03-07
Component:
core-libs
OS:
generic,linux,windows_xp
Sub-Component:
java.util
CPU:
generic,x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:

Related Reports
Backport:
Duplicate:

Sub Tasks

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
                                     
2006-04-10



Hardware and Software, Engineered to Work Together