Implemented Collection.getIndexes method.