Movatterモバイル変換


[0]ホーム

URL:


Scala 3
3.7.4
LearnInstallPlaygroundFind A LibraryCommunityBlog
Scala 3
LearnInstallPlaygroundFind A LibraryCommunityBlog
DocsAPI
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL
Scala 3/scala/scala.collection/MapOps/WithFilter

WithFilter

scala.collection.MapOps.WithFilter
classWithFilter[K,+V,+IterableCC[_],+CC <:([_,_] =>>IterableOps[_,AnyConstr,_])](self:MapOps[K,V,CC,_] &IterableOps[(K,V),IterableCC,_],p: ((K,V))=>Boolean) extendsWithFilter[(K,V),IterableCC],Serializable

SpecializesWithFilter for Map collection types by adding overloads to transformation operations that can return a Map.

Attributes

Source
Map.scala
Graph
Supertypes
classWithFilter[(K,V),IterableCC]
classWithFilter[(K,V),IterableCC]
classObject
traitMatchable
classAny
Show all
Known subtypes
classWithFilter[K,V,IterableCC,MapCC,CC]

Members list

Value members

Concrete methods

defflatMap[K2,V2](f: ((K,V))=>IterableOnce[(K2,V2)]):CC[K2,V2]

Attributes

Source
Map.scala
defmap[K2,V2](f: ((K,V))=> (K2,V2)):CC[K2,V2]

Attributes

Source
Map.scala
overridedefwithFilter(q: ((K,V))=>Boolean):WithFilter[K,V,IterableCC,CC]

Further refines the filter for thisfiltered map collection.

Further refines the filter for thisfiltered map collection.

Value parameters

q

the predicate used to test elements.

Attributes

Returns

an object of classWithFilter, which supportsmap,flatMap,foreach, andwithFilter operations. All these operations apply to those elements of this map collection which also satisfy bothp andq predicates.

Definition Classes
Source
Map.scala

Inherited methods

defflatMap[B](f: (K,V)=>IterableOnce[B]):IterableCC[B]

Builds a new collection by applying a function to all elements of thefiltered outer collection containing thisWithFilter instance that satisfy

Builds a new collection by applying a function to all elements of thefiltered outer collection containing thisWithFilter instance that satisfy

Type parameters

B

the element type of the returned collection.

Value parameters

f

the function to apply to each element.

Attributes

Returns

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

Inherited from:
WithFilter
Source
Iterable.scala
defforeach[U](f: (K,V)=>U):Unit

Applies a functionf to all elements of thefiltered outer collection.

Applies a functionf to all elements of thefiltered outer collection.

Type parameters

U

the type parameter describing the result of functionf. This result will always be ignored. TypicallyU isUnit, but this is not necessary.

Value parameters

f

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

Attributes

Inherited from:
WithFilter
Source
Iterable.scala
defmap[B](f: (K,V)=>B):IterableCC[B]

Builds a new collection by applying a function to all elements of thefiltered outer collection.

Builds a new collection by applying a function to all elements of thefiltered outer collection.

Type parameters

B

the element type of the returned collection.

Value parameters

f

the function to apply to each element.

Attributes

Returns

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

Inherited from:
WithFilter
Source
Iterable.scala
In this article
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL

[8]ページ先頭

©2009-2025 Movatter.jp