Wraps a java iterator into a scala iterator, and casts it's elements. This is faster than jIterator.asScala.map(_.asInstanceOf[B]) because 1) .asScala conversion is actually quite slow: multiple method calls and a match without @switch 2) no additional map step that iterates and creates yet another iterator
Wraps a java iterator into a scala iterator, and casts it's elements. This is faster than jIterator.asScala.map(_.asInstanceOf[B]) because 1) .asScala conversion is actually quite slow: multiple method calls and a match without @switch 2) no additional map step that iterates and creates yet another iterator