trait _foreach[A] extends Stream.Flow._consume._foreach[A]
- Self Type
- Stream[A]
Ordering
- Alphabetic
Inherited
- Stream._consume._foreach
- Stream.Flow._consume._foreach
- scala.AnyRef
- scala.Any
- Hide All
- Show All
Visibility
- Public
- All
Method
-
def
apply(c: Consumer[A], forEmpty: ⇒ Any = ()): Unit
For each or for empty
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
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
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
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
-
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
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )