On 17/05/11 11:53, Jorge Christodoulou wrote:

Hi, I have ResultSet a and ResultSet b
(com.hp.hpl.jena.query.ResultSet) for(; a.hasNext() ;){ String s_a =
a.nextSolution().get(commonVars.get(0)).toString();     for(; b.hasNext()
;){             String s_b = b.nextSolution().get(commonVars.get(0)).toString();
if(s_a.equalsIgnoreCase(s_b))                   .....   }} The problem is that 
it gets
in the second loop only for the first iteration of the first loop.Is
this because Iterators are single use only and what can i do if so?
Any ideas will be helpfull.

(unreadable)

If a and b are the same ResultSet (iterator), then yes, ResultSets are use-once. See ResultSetFacory.makeRewindable

        Andy

Reply via email to