Stream.Preview.LazySize
abstract class LazySize
When evaluated with comparison operators, [LazySize] preloads just enough stream elements to answer the questions
def s : Stream[String] = ???
def ps : Stream.Preview[String] = s.preview
ps.previewSize >= 10 // This will pre-load no more than 10 elements
ps.previewSize < 100 // This will pre-load no more than 100 elements
- Source
- LazySize.scala
class java.lang.Object
trait scala.Matchable
class Any
Def
Total size
Total size
Preloads all elements, unless sizing is available in metadata
- Source
- LazySize.scala