Is the object a set?
Then just iterate through the set, pickout out the individual pieces.
It's not clear where you'd put the individual pieces though. Probably another Collection.
What do you want to do with the two parts?
And if the object is a set, you can cast it to a Set so you can then get the iterator.
And if you're using JDK1.5, consider using generics so you don't have to do the casting.
Message was edited by:
paulcw