Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int cur = availabilityMap.nextSetBit(0);
- V next = ids.get(cur);
- @Override
- public boolean hasNext()
- {
- return next != null;
- }
- @Override
- public V next()
- {
- V ret = next;
- do {
- cur = availabilityMap.nextSetBit(cur + 1);
- next = ids.get(cur);
- } while (next == null && cur != -1);
- return ret;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement