Packages

object Searching

Source
Searching.scala
Linear Supertypes
Content Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Searching
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. case class Found(foundIndex: Int) extends SearchResult with Product with Serializable

    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.

    foundIndex

    the index corresponding to the element searched for in the sequence

  2. case class InsertionPoint(insertionPoint: Int) extends SearchResult with Product with Serializable

    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

    insertionPoint

    the index where the element would be inserted in the sequence

  3. sealed abstract class SearchResult extends AnyRef

    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 searching
    list.search(4) // Found(2)
    list.search(2) // InsertionPoint(1)

Deprecated Type Members

  1. final class SearchImpl[Repr, A] extends AnyVal
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Search methods are defined directly on SeqOps and do not require scala.collection.Searching any more

Deprecated Value Members

  1. implicit def search[Repr, A](coll: Repr)(implicit fr: IsSeq[Repr]): SearchImpl[Repr, generic.IsSeq.A]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Search methods are defined directly on SeqOps and do not require scala.collection.Searching any more