as a subset or subcollection.
Im using a treeset and i already verified that all the buckets were added to
the set in the correct place including the buckets that were in another bucket.
My question is can the iterator for the set of main buckets interate over the set of main buckets and when it reaches a bucket, let say bucket C, that contains sub buckets, iterate through those buckets in C, then get back to the main list
and continue?
I have a simple iterator that iterates over such a list but im not sure if it is possible to do the above.
Here is the method:
public String printBuckets(){ //a lot of work to be done here
Iterator iptr = treeset.iterator();
String str = new String("");
while(iptr.hasNext())
str = str + iptr.next().toString() + "\n";
return str;
}


Sign In
Create Account


Back to top









