Class

io.fsq.common.scala

FSIterable

Related Doc: package scala

Permalink

final class FSIterable[CC[X] <: Iterable[X], T, Repr <: IterableLike[T, Repr] with GenericTraversableTemplate[T, CC]] extends AnyVal

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

Instance Constructors

  1. new FSIterable(xs: IterableLike[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. final def ==(arg0: Any): Boolean

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

    Permalink
    Definition Classes
    Any
  5. def chunkFlatMap[V](size: Int)(f: (Repr) ⇒ TraversableOnce[V]): CC[V]

    Permalink

    Break a big list into smaller chunks and map each chunk

  6. def chunkMap[V](size: Int)(f: (Repr) ⇒ V): CC[V]

    Permalink
  7. def exactlyOne: Option[T]

    Permalink
  8. def filterOutWith(pred: (T) ⇒ Boolean, f: (T) ⇒ Unit): CC[T]

    Permalink

    Filter out elements that match the predicate, applying the supplied function to each filtered out element, and returning the remaining elements.

  9. def flatMapFind[U](f: (T) ⇒ Option[U]): Option[U]

    Permalink

    Applies f to each item in the collection until the first Some[U] is found and return it, or None otherwise

  10. def flatToListBy[U](f: (T) ⇒ TraversableOnce[U]): List[U]

    Permalink

    Applies f to each item in the collection and returns a List

  11. def flatToMapBy[K, V](f: (T) ⇒ Option[(K, V)]): Map[K, V]

    Permalink

    Applies f to each item in the collection and returns a Map, discarding duplicates.

  12. def flatToMapByKey[K](f: (T) ⇒ Option[K]): Map[K, T]

    Permalink

    Creates a map from a sequence, mapping each element in the sequence by a given Option[key].

    Creates a map from a sequence, mapping each element in the sequence by a given Option[key]. If keys are duplicated or None, values will be discarded.

  13. def flatToSetBy[U](f: (T) ⇒ TraversableOnce[U]): Set[U]

    Permalink

    Applies f to each item in the collection and returns a Set

  14. def flatToVectorBy[U](f: (T) ⇒ TraversableOnce[U]): Vector[U]

    Permalink

    Applies f to each item in the collection and returns a Vector

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

    Permalink
    Definition Classes
    AnyVal → Any
  16. def groupByKeyValue[K, V](f: (T) ⇒ (K, V)): Map[K, Seq[V]]

    Permalink

    Groups the given sequence by a function that transforms the sequence into keys and values.

    Groups the given sequence by a function that transforms the sequence into keys and values. For example. Seq(1 -> "a", 2 -> "a", "1" -> "b").groupByKeyValue(x => x) will return Map(1 -> List(a, b), 2 -> List(a))

  17. def hasOverlap(ys: Iterable[T]): Boolean

    Permalink
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. def newBuilder[A]: Builder[A, CC[A]]

    Permalink
  20. def slidingOptPairs: CC[(T, Option[T])]

    Permalink
  21. def slidingPairs: CC[(T, T)]

    Permalink

    Convenience wrapper for Iterable.sliding(2) that gives you #exactlywhatyouwant: tuples instead of Lists

  22. def toListBy[U](f: (T) ⇒ U): List[U]

    Permalink

    Applies f to each item in the collection and returns a List

  23. def toMapAccumValues[K, V](implicit ev: <:<[T, (K, V)]): Map[K, Seq[V]]

    Permalink

    Like toMap, but accumulates the values into a Seq, rather than discarding the values of duplicated keys.

  24. def toMapBy[K, V](f: (T) ⇒ (K, V)): Map[K, V]

    Permalink

    Applies f to each item in the collection and returns a Map, discarding duplicates.

  25. def toMapByKey[K](f: (T) ⇒ K): Map[K, T]

    Permalink

    Creates a map from a sequence, mapping each element in the sequence by a given key.

    Creates a map from a sequence, mapping each element in the sequence by a given key. If keys are duplicated, values will be discarded.

  26. def toMutableMapBy[K, V](f: (T) ⇒ (K, V)): Map[K, V]

    Permalink

    Applies f to each item in the collection and returns a mutable Map, discarding duplicates.

  27. def toSetBy[U](f: (T) ⇒ U): Set[U]

    Permalink

    Applies f to each item in the collection and returns a Set

  28. def toString(): String

    Permalink
    Definition Classes
    Any
  29. def toVectorBy[U](f: (T) ⇒ U): Vector[U]

    Permalink

    Applies f to each item in the collection and returns a Vector

  30. def topNPartition(size: Int)(implicit ord: Ordering[T]): (CC[T], CC[T])

    Permalink

    Returns the top N elements in the Iterable.

    Returns the top N elements in the Iterable. They'll come back in no particular order.

  31. def topNSorted(size: Int)(implicit ord: Ordering[T]): Seq[T]

    Permalink

    Returns the top N elements in the Iterable.

    Returns the top N elements in the Iterable. They'll come back sorted :)

  32. def topNUnsorted(size: Int)(implicit ord: Ordering[T]): CC[T]

    Permalink

    Returns the top N elements in the Iterable.

    Returns the top N elements in the Iterable. They'll come back in no particular order.

  33. val xs: IterableLike[T, Repr] with GenericTraversableTemplate[T, CC]

    Permalink
  34. def zipLeftOption[U](ys: Iterable[U]): CC[(T, Option[U])]

    Permalink

    Like zip, but continues even after the second iterable has been exhausted.

  35. def zipOption[U](ys: Iterable[U]): CC[(Option[T], Option[U])]

    Permalink

    Like zip, but doesn't stop until *both* iterables are exhausted.

    Like zip, but doesn't stop until *both* iterables are exhausted. The length of the result will be max(firstList.size, secondList.size).

  36. def zipRightOption[U](ys: Iterable[U]): CC[(Option[T], U)]

    Permalink

    Like zip, but continues even after the first iterable has been exhausted.

Inherited from AnyVal

Inherited from Any

Ungrouped