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/Searching

Searching

scala.collection.Searching
objectSearching

Attributes

Source
Searching.scala
Graph
Supertypes
classObject
traitMatchable
classAny
Self type

Members list

Type members

Classlikes

caseclassFound(foundIndex:Int) extendsSearchResult

The result of performing a search on a sorted sequence, where the element was found.

The result of performing a search on a sorted sequence, where the element was found.

Value parameters

foundIndex

the index corresponding to the element searched for in the sequence

Attributes

Source
Searching.scala
Supertypes
traitProduct
traitEquals
classObject
traitMatchable
classAny
Show all
caseclassInsertionPoint(insertionPoint:Int) extendsSearchResult

The result of performing a search on a sorted sequence, where the element was not found

The result of performing a search on a sorted sequence, where the element was not found

Value parameters

insertionPoint

the index where the element would be inserted in the sequence

Attributes

Source
Searching.scala
Supertypes
traitProduct
traitEquals
classObject
traitMatchable
classAny
Show all
sealed abstractclassSearchResult

The result of performing a search on a sorted sequence

The result of performing a search on a sorted sequence

Example usage:

val list = List(1, 3, 4, 5) // list must be sorted before searchinglist.search(4) // Found(2)list.search(2) // InsertionPoint(1)

Attributes

Source
Searching.scala
Supertypes
classObject
traitMatchable
classAny
Known subtypes

Deprecated classlikes

finalclassSearchImpl[Repr,A](coll:SeqOps[A,AnyConstr,_]) extendsAnyVal

Attributes

Deprecated
[Since version 2.13.0]Search methods are defined directly on SeqOps and do not require scala.collection.Searching any more
Source
Searching.scala
Supertypes
classAnyVal
traitMatchable
classAny

Implicits

Deprecated implicits

implicitdefsearch[Repr,A](coll:Repr)(implicitfr:IsSeq[Repr]):SearchImpl[Repr, fr.A]

Attributes

Deprecated
[Since version 2.13.0]Search methods are defined directly on SeqOps and do not require scala.collection.Searching any more
Source
Searching.scala
In this article
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL

[8]ページ先頭

©2009-2025 Movatter.jp