Obect to a set

Object obj=rItem.getPropertyValue(mySubjects);System.out.println(obj);The above returns: [mySubject:300002, mySubject:300005]But I want to split both mySubject:300002 and mySubject:300005 into 2 parts....How to do that?
[254 byte] By [Amit-Pugaliaa] at [2007-10-3 3:21:01]
# 1

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

paulcwa at 2007-7-14 21:13:15 > top of Java-index,Java Essentials,Java Programming...