/** A lazy cons cell, from which streams are built. */
@SerialVersionUID(-602202424901551803L)
final class Cons[+A](hd: A, tl: => Stream[A]) extends Stream[A] with Serializable {
override def isEmpty = false
override def head = hd
@volatile private[this] var tlVal: Stream[A] = _
def tailDefined: Boolean = tlVal ne null
override def tail: Stream[A] = {
if (!tailDefined)
synchronized {
if (!tailDefined) tlVal = tl
}
tlVal
}
}
でワイルドカードは何_
を表し@volatile private[this] var tlVal: Stream[A] = _
ますか?