t

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' <> 'C').all.peek("Process " + _ lp).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 <> 3).all.foreach("Element: " + _ lp)
    
    // 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

    start

    starting value for the index in the f function

    ('A' <> 'C').all.foreachIdx("Element " + _ + " = " + _ lp, 1)
    
    // Output
    Element 1 = A
    Element 2 = B
    Element 3 = C
    Definition Classes
    _foreach
  10. def foreachSynchronized(f: Consumer[A]): Unit

    Calls foreach

    Calls foreach

    foreachSynchronized is inherited from Stream.Flow, which could be parallel

    Stream is sequential by itself, so foreachSynchronized is same as regular foreach

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