I need to iterate through a BucketMap
and get all keys
but how do I get to something like buckets[i].next.next.next.key
for instance witho
With Java 8, I would suggest you to use Stream API.
It will allow you to iterate through the Map in a much more convenient approach:
public void iterateUsingStreamAPI(Map map) {
map.entrySet().stream()
// ...
.forEach(e -> System.out.println(e.getKey() + ":" + e.getValue()));
}
Check out for more examples about iteration through maps in Java.