Class

eu.shiftforward.apso.Implicits

ApsoSeq

Related Doc: package Implicits

Permalink

implicit final class ApsoSeq[T] extends AnyVal

Implicit class that provides new methods for sequences.

Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ApsoSeq
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ApsoSeq(seq: Seq[T])

    Permalink

    seq

    the sequence to which the new methods are provided

Value Members

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

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

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

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

    Permalink
    Definition Classes
    Any
  5. def getClass(): Class[_ <: AnyVal]

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

    Permalink
    Definition Classes
    Any
  7. def sample(percentage: Double): Seq[T]

    Permalink

    Returns a subsequence of this sequence based on a percentage of the total number of elements.

    Returns a subsequence of this sequence based on a percentage of the total number of elements.

    percentage

    the percentage of elements of this sequence that the returned sequence must contain

    returns

    a subsequence of this sequence based on a percentage of the total number of elements.

  8. val seq: Seq[T]

    Permalink

    the sequence to which the new methods are provided

  9. def split(n: Int): IndexedSeq[Seq[T]]

    Permalink

    Partitions this sequence into a given number of subsequences.

    Partitions this sequence into a given number of subsequences. It is guaranteed that the sequence is split into subsquences as even as possible; if the split is uneven, the first this.length % n subsequences contain one more element than the remaining ones.

    n

    the number of subsequences into which this sequence must be split

    returns

    a new sequence of n subsequences of this sequence.

  10. def takeLargest(n: Int)(implicit ord: Ordering[T]): Seq[T]

    Permalink

    Returns a set containing the n largest elements of this sequence

    Returns a set containing the n largest elements of this sequence

    n

    number of elements to extract

    ord

    element ordering

    returns

    an unordered sequence of the n largest elements

  11. def takeSmallest(n: Int)(implicit ord: Ordering[T]): Seq[T]

    Permalink

    Returns a set containing the n smallest elements of this sequence

    Returns a set containing the n smallest elements of this sequence

    n

    number of elements to extract

    ord

    element ordering

    returns

    an unordered sequence of the n smallest elements

  12. def toString(): String

    Permalink
    Definition Classes
    Any

Inherited from AnyVal

Inherited from Any

Ungrouped