WithFilter
A template trait that contains just the map, flatMap, foreach and withFilter methods
of trait Iterable.
A template trait that contains just the map, flatMap, foreach and withFilter methods
of trait Iterable.
- Type Params
- A
Element type (e.g.
Int)- CC
Collection type constructor (e.g.
List)
Value members
Abstract methods
Builds a new collection by applying a function to all elements of the
filtered outer collection containing this WithFilter instance that satisfy
Builds a new collection by applying a function to all elements of the
filtered outer collection containing this WithFilter instance that satisfy
- Type Params
- B
the element type of the returned collection.
- Value Params
- f
the function to apply to each element.
- Returns
a new collection resulting from applying the given collection-valued function
fto each element of the filtered outer collection and concatenating the results.
Applies a function f to all elements of the filtered outer collection.
Applies a function f to all elements of the filtered outer collection.
- Type Params
- U
the type parameter describing the result of function
f. This result will always be ignored. TypicallyUisUnit, but this is not necessary.
- Value Params
- f
the function that is applied for its side-effect to every element. The result of function
fis discarded.
Builds a new collection by applying a function to all elements of the
filtered outer collection.
Builds a new collection by applying a function to all elements of the
filtered outer collection.
- Type Params
- B
the element type of the returned collection.
- Value Params
- f
the function to apply to each element.
- Returns
a new collection resulting from applying the given function
fto each element of the filtered outer collection and collecting the results.
Further refines the filter for this filtered collection.
Further refines the filter for this filtered collection.
- Value Params
- q
the predicate used to test elements.
- Returns
an object of class
WithFilter, which supportsmap,flatMap,foreach, andwithFilteroperations. All these operations apply to those elements of this collection which also satisfy bothpandqpredicates.