Class

io.fsq.common.scala

FSTraversable

Related Doc: package scala

Permalink

final class FSTraversable[CC[X] <: Traversable[X], T, Repr <: TraversableLike[T, Repr]] extends AnyVal

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

Instance Constructors

  1. new FSTraversable(xs: TraversableLike[T, Repr] with GenericTraversableTemplate[T, CC])

    Permalink

Value Members

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

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

    Permalink
    Definition Classes
    Any
  3. def ---(ys: Traversable[T]): Repr

    Permalink
  4. final def ==(arg0: Any): Boolean

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

    Permalink
    Definition Classes
    Any
  6. def collectFirstOpt[U](f: (T) ⇒ Option[U]): Option[U]

    Permalink
  7. def countDistinctBy[U](f: (T) ⇒ U): Int

    Permalink
  8. def crowd[K](limit: Int, p: (T) ⇒ K): CC[T]

    Permalink

    Return a sublist of items where at most N items for any given predicate value are included.

    Return a sublist of items where at most N items for any given predicate value are included. Preserves order within a group, but not the order of predicates (yet!).

  9. def distinctBy[U](f: (T) ⇒ U): CC[T]

    Permalink
  10. def distinctCounts: Map[T, Int]

    Permalink

    Return a Map whose keys are the items in this Iterable, and whose values are the number of times that item occurred in the list

  11. def flatDistinctBy[U](f: (T) ⇒ Option[U]): CC[T]

    Permalink
  12. def flatGroupBy[S](f: (T) ⇒ Option[S]): Map[S, Repr]

    Permalink
  13. def flatMapAccum[A, B](a: A)(f: (A, T) ⇒ (A, TraversableOnce[B])): (A, CC[B])

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

    Permalink
    Definition Classes
    AnyVal → Any
  15. def groupWhile(f: (T, T) ⇒ Boolean): CC[CC[T]]

    Permalink

    Return a list of lists divided by the provided predicate.

  16. def has(e: T): Boolean

    Permalink
  17. def histogramBy[U](f: (T) ⇒ U): Vector[(U, Int)]

    Permalink

    Return a histogram (sequence of (item, count) elements) by a given function.

    Return a histogram (sequence of (item, count) elements) by a given function.

    Usage: Seq("Do", "Re", "Mi", "Fa", "So", "La", "Ti", "Do").histogramBy(_.last) // returns: Vector((o,3), (a,2), (i,2), (e,1))

  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. def mapAccum[A, B](a: A)(f: (A, T) ⇒ (A, B)): (A, CC[B])

    Permalink
  20. def maxByOption[U](f: (T) ⇒ U)(implicit ord: Ordering[U]): Option[T]

    Permalink
  21. def maxOption(implicit ord: Ordering[T]): Option[T]

    Permalink
  22. def minByOption[U](f: (T) ⇒ U)(implicit ord: Ordering[U]): Option[T]

    Permalink

    Return the smallest element from the Seq according to the supplied sort function.

  23. def minOption(implicit ord: Ordering[T]): Option[T]

    Permalink
  24. def mkJoin[S >: T](sep: S): CC[S]

    Permalink

    Create a new collection which separates the elements of the original collection by sep

  25. def newBuilder[A]: Builder[A, CC[A]]

    Permalink
  26. def partitionN(fs: (T) ⇒ Boolean*): Seq[Seq[T]]

    Permalink

    Partition a list by an arbitrary set of predicates.

    Partition a list by an arbitrary set of predicates. The output is a list of lists, where the index in that list indicates which predicate the element passed. The remainder (those elements that did not pass any test) is stored at index fs.size.

    Example: (0 to 10).partitionN((x: Int) => x % 3 =? 0, (x: Int) => x % 5 =? 0) // returns: Vector(Vector(0, 3, 6, 9), Vector(5, 10), Vector(1, 2, 4, 7, 8))

  27. def tailOption: Option[Repr]

    Permalink
  28. def toString(): String

    Permalink
    Definition Classes
    Any
  29. val xs: TraversableLike[T, Repr] with GenericTraversableTemplate[T, CC]

    Permalink

Inherited from AnyVal

Inherited from Any

Ungrouped