a couple of comments:
* I think you should check if ```index == ALL``` when ```b == true``` or update the javadoc that the invocation of this method will enable indexing
* when ```b == false```, you are no changing the ```index``` to ```ALL```