Skip to main content

There is a wrapper class (scala.collectionscollection.jcl.MutableIterator.Wrapper). So if you define

implicit def javaIteratorToScalaIterator[A](it : java.util.Iterator[A]) = new Wrapper(it) 

then it will act as a sub class of the Scala iterator so you can do foreach.

There is a wrapper class (scala.collections.jcl.MutableIterator.Wrapper). So if you define

implicit def javaIteratorToScalaIterator[A](it : java.util.Iterator[A]) = new Wrapper(it) 

it will act as a sub class of the Scala iterator so you can do foreach.

There is a wrapper class (scala.collection.jcl.MutableIterator.Wrapper). So if you define

implicit def javaIteratorToScalaIterator[A](it : java.util.Iterator[A]) = new Wrapper(it) 

then it will act as a sub class of the Scala iterator so you can do foreach.

Copy edited. Removed the forum-like part - this should be in comments.
Source Link
Peter Mortensen
  • 31.4k
  • 22
  • 110
  • 134

There is a wrapper class (scala.collections.jcl.MutableIterator.Wrapperscala.collections.jcl.MutableIterator.Wrapper). soSo if you define

implicit def javaIteratorToScalaIterator[A](it : java.util.Iterator[A]) = new Wrapper(it) 

it will act as a sub class of the scala IteratorScala iterator so you can do foreach.

I couldn't find an implicit conversion for this already in the scala libraries, please tell me if you find itforeach.

There is a wrapper class (scala.collections.jcl.MutableIterator.Wrapper). so if you define

implicit def javaIteratorToScalaIterator[A](it : java.util.Iterator[A]) = new Wrapper(it) 

it will act as a sub class of the scala Iterator so you can do foreach.

I couldn't find an implicit conversion for this already in the scala libraries, please tell me if you find it.

There is a wrapper class (scala.collections.jcl.MutableIterator.Wrapper). So if you define

implicit def javaIteratorToScalaIterator[A](it : java.util.Iterator[A]) = new Wrapper(it) 

it will act as a sub class of the Scala iterator so you can do foreach.

added 3 characters in body; added 1 characters in body
Source Link
SteveD
  • 5.4k
  • 1
  • 26
  • 34

There is a wrapper class (scala.collections.jcl.MutableIterator.Wrapper). so if you define

implicit def javaIteratorToScalaIterator[A](it : java.util.Iterator[A]) = new Wrapper(it)

implicit def javaIteratorToScalaIterator[A](it : java.util.Iterator[A]) = new Wrapper(it) 

it will act as a sub class of the scala Iterator so you can do foreach.

I couldn't find an implicit conversion for this already in the scala libraries, please tell me if you find it.

There is a wrapper class (scala.collections.jcl.MutableIterator.Wrapper). so if you define

implicit def javaIteratorToScalaIterator[A](it : java.util.Iterator[A]) = new Wrapper(it)

it will act as a sub class of the scala Iterator so you can do foreach.

I couldn't find an implicit conversion for this already in the scala libraries, please tell me if you find it.

There is a wrapper class (scala.collections.jcl.MutableIterator.Wrapper). so if you define

implicit def javaIteratorToScalaIterator[A](it : java.util.Iterator[A]) = new Wrapper(it) 

it will act as a sub class of the scala Iterator so you can do foreach.

I couldn't find an implicit conversion for this already in the scala libraries, please tell me if you find it.

Post Made Community Wiki
Source Link
James
James
Loading