私は次の暗黙の変換を持っていますjava.util.Enumerations
implicit def enumerationIterator[A](e : Enumeration[A]) : Iterator[A] = {
new Iterator[A] {
def hasNext = e.hasMoreElements
def next = e.nextElement
def remove = throw new UnsupportedOperationException()
}
}
残念ながら、 (関連する質問ZipFile.entries
を参照)を返し、Scalacが私に言い続けているため、機能しません。Enumeration<? extends ZipEntry>
type mismatch; found : java.util.Iterator[?0]
where type ?0 <: java.util.zip.ZipEntry
required: Iterator[?]
sthで会話を機能させる方法がわかりません。お気に入り
List.fromIterator(new ZipFile(z).entries))