com.daodecode.scalax.collection.extensions

SeqLikeExtension

implicit final class SeqLikeExtension[A, Repr] extends AnyVal

Linear Supertypes
AnyVal, NotNull, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. SeqLikeExtension
  2. AnyVal
  3. NotNull
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SeqLikeExtension(seqLike: SeqLike[A, Repr])

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  2. final def ##(): Int

    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. def distinctBy[B](f: (A) ⇒ B, takeFirst: (A, A) ⇒ Boolean)(implicit cbf: CanBuildFrom[Repr, A, Repr]): Repr

    Builds a new collection from this collection without any duplicate elements (as determined by == after applying transforming function f).

    Builds a new collection from this collection without any duplicate elements (as determined by == after applying transforming function f). Function takeFirst defines which of duplicates will be preserved. If it returns true first of compared duplicates will be kept, second one otherwise.

    Example:

    scala> val xs = List(1 -> "one", 1 -> "ten", 2 -> "two", 2 -> "twenty").
    | distinctBy(_._1, takeFirst = _._2.length > _._2.length)
    xs: List[(Int, String)] = List((1,ten), (2,twenty))
    returns

    A new collection which contains selected occurrence of every element of this collection.

    Since

    0.1.1

  6. def distinctBy[B](f: (A) ⇒ B)(implicit cbf: CanBuildFrom[Repr, A, Repr]): Repr

    Builds a new collection from this collection without any duplicate elements (as determined by == after applying transforming function f).

    Builds a new collection from this collection without any duplicate elements (as determined by == after applying transforming function f). First of all the duplicates is preserved

    Example:

    scala> val xs = List(1 -> "one", 1 -> "ten", 2 -> "two", 2 -> "twenty").distinctBy(_._1)
    xs: List[(Int, String)] = List((1,one), (2,two))
    returns

    A new collection which contains the first occurrence of every element of this collection.

    Since

    0.1.0

  7. def getClass(): Class[_ <: AnyVal]

    Definition Classes
    AnyVal → Any
  8. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  9. val seqLike: SeqLike[A, Repr]

  10. def toString(): String

    Definition Classes
    Any

Inherited from AnyVal

Inherited from NotNull

Inherited from Any

Ungrouped