Is there a Java idiom for pairwise iteration through the elements of a sorted Collection? By that I mean that each iteration has access to one element of the co
Collection
Iterator thingerator = coll.iterator(); if (thingerator.hasNext()) { Thing thing1 = thingerator.next(); while (thingerator.hasNext()) { final Thing thing2 = thingerator.next(); doStuffToThings(thing1, thing2); thing1 = thing2; } }