WithFilter

class WithFilter[+A, +IterableCC[_], +CC <: (SortedSet)](self: SortedSetOps[A, CC, _] & IterableOps[A, IterableCC, _], p: A => Boolean) extends WithFilter[A, IterableCC]

Specialize WithFilter for sorted collections

Source:
SortedSet.scala
class WithFilter[A, IterableCC]
class WithFilter[A, IterableCC]
class Object
trait Matchable
class Any

Value members

Concrete methods

def flatMap[B : Ordering](f: A => IterableOnce[B]): CC[B]
def map[B : Ordering](f: A => B): CC[B]
override def withFilter(q: A => Boolean): WithFilter[A, IterableCC, CC]

Further refines the filter for this filtered sorted collection.

Further refines the filter for this filtered sorted collection.

Value parameters:
q

the predicate used to test elements.

Returns:

an object of class WithFilter, which supports map, flatMap, foreach, and withFilter operations. All these operations apply to those elements of this sorted collection which also satisfy both p and q predicates.

Definition Classes
Source:
SortedSet.scala

Inherited methods

def flatMap[B](f: A => IterableOnce[B]): CC[B]

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 parameters:
B

the element type of the returned collection.

Value parameters:
f

the function to apply to each element.

Returns:

a new collection resulting from applying the given collection-valued function f to each element of the filtered outer collection and concatenating the results.

Inherited from:
WithFilter
Source:
Iterable.scala
def foreach[U](f: A => U): Unit

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 parameters:
U

the type parameter describing the result of function f. This result will always be ignored. Typically U is Unit, but this is not necessary.

Value parameters:
f

the function that is applied for its side-effect to every element. The result of function f is discarded.

Inherited from:
WithFilter
Source:
Iterable.scala
def map[B](f: A => B): CC[B]

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 parameters:
B

the element type of the returned collection.

Value parameters:
f

the function to apply to each element.

Returns:

a new collection resulting from applying the given function f to each element of the filtered outer collection and collecting the results.

Inherited from:
WithFilter
Source:
Iterable.scala