t
scalqa

Stream._consume._foreach

trait _foreach[A] extends Stream.Flow._consume._foreach[A]

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

Method

  1. def apply(c: Consumer[A], forEmpty: ⇒ Any = ()): Unit

    For each or for empty

    For each or for empty

    Calls foreach if there are elements

    Executes forEmpty otherwise

    Definition Classes
    _foreach
  2. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  3. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  4. def drain: Unit

    Discharge everything

    Discharge everything

    Calls foreach, discarding all retrieved elements

    Even though nothing is done at this point, this method can be run for the benefit of other functions in the pipeline

    ('A' to 'C').all.peek(v => println("Process " + v)).drain
    
    // Output
    Process A
    Process B
    Process C
    Definition Classes
    _foreach
  5. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  6. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  7. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  8. abstract def foreach(f: Consumer[A]): Unit

    For each

    For each

    Applies given function for each element

    (1 to 3).all.foreach(v => println("Element: " + v))
    
    // Output
    Element: 1
    Element: 2
    Element: 3
    Definition Classes
    _foreach
  9. def foreachIdx(f: Consumer.Idx[A], start: Int = 0): Unit

    For each indexed

    For each indexed

    Calls foreach with counter

    ('A' to 'C').all.foreachIdx((i,v) => println("Element " + i + " = " + v), 1)
    
    // Output
    Element 1 = A
    Element 2 = B
    Element 3 = C
    start

    starting value for indexing

    Definition Classes
    _foreach
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  15. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. 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