t

Stream._iterate

trait _Trait[A] extends AnyRef

Iteration Interface

Self Type
Stream[A]
Ordering
  1. Alphabetic
Inherited
  1. Stream._iterate
  2. scala.AnyRef
  3. scala.Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Method

  1. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  2. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  3. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  4. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  6. def findNextOpt(f: Filter[A]): Opt[A]

    Find next element

    Find next element

    Iterates elements until the first satisfying the filter is found

    Definition Classes
    _Trait
  7. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  8. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  9. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def next: A

    Next element

    Next element

    Delivers next element

    Fails if no elements

    Implemented as:

    def next: A = if (prime) pump else Stream.failEmpty
    Definition Classes
    _Trait
  11. def nextOpt: Opt[A]

    Next element

    Next element

    Optionally returns next element or Opt.Void

    Definition Classes
    _Trait
  12. final def notify(): Unit
    Definition Classes
    AnyRef
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  14. abstract def prime: Boolean

    Get next element ready

    Get next element ready

    Prepares next element to be pumped. If required, the element might be requested from the source and saved locally

    Returns true if there is element waiting to be pumped or false if Stream is empty

    prime can be called multiple times without pumping the element, in this case it must consistently return the same value

    prime can be used similarly to Iterator.hasNext

    Definition Classes
    _Trait
  15. abstract def pump: A

    Pump next element

    Pump next element

    pump is a faster next

    The Stream MUST be successfully 'primed' before pump is called

    val s : ~[Int] = 1 <> 3
    
    while(s.prime) s.pump.lp
    
    // Prints
    1
    2
    3
    Definition Classes
    _Trait
  16. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  17. def take(cnt: Int): ~[A]

    Group iterate

    Group iterate

    Iterates through several elements at once and returns them as different Stream

    val s : ~[Int] = 1 <> 30
    
    s.take(5).lp  // Prints ~(1, 2, 3, 4, 5)
    
    s.take(12).lp // Prints ~(6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)
    
    s.take(7).lp  // Prints ~(18, 19, 20, 21, 22, 23, 24)
    
    // Print leftovers
    s.lp          // Prints ~(25, 26, 27, 28, 29, 30)
    Definition Classes
    _Trait
  18. def toString(): String
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Operator

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
Linear Supertypes
AnyRef, Any
Source: _Trait.scala