public static IntIntFindingIterator cursorToIntIntIterator(final Iterator<IntIntCursor> cursor) {
return new IntIntFindingIterator() {
@Override
protected boolean findNext() {
if (!cursor.hasNext()) return false;
IntIntCursor cur = cursor.next();
myNextLeft = cur.key;
myNextRight = cur.value;
return true;
}
};