Class

fm.common.rich

RichTraversableOnce

Related Doc: package rich

Permalink

final class RichTraversableOnce[A, COL] extends AnyRef

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

Instance Constructors

  1. new RichTraversableOnce(self: COL)(implicit toTraversableOnce: (COL) ⇒ TraversableOnce[A])

    Permalink

Value Members

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

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

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

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

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  6. def collapseBy[K](f: (A) ⇒ K): IndexedSeq[(K, Seq[A])]

    Permalink

    Collapse records that are next to each other by a key

    Collapse records that are next to each other by a key

    e.g.: This groups evens and odds together:

    scala> Vector(2,4,6,1,3,2,5,7).collapseBy{ _ % 2 == 0 } res1: IndexedSeq[(Boolean, Seq[Int])] = Vector((true,Vector(2, 4, 6)), (false,Vector(1, 3)), (true,Vector(2)), (false,Vector(5, 7)))

  7. def countBy[K](f: (A) ⇒ K): Map[K, Int]

    Permalink

    Like groupBy but returns the count of each key instead of the actual values

  8. def distinctUsing[B](f: (A) ⇒ B)(implicit ord: Ordering[B]): IndexedSeq[A]

    Permalink
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def findMapped[B](f: (A) ⇒ Option[B]): Option[B]

    Permalink

    A combination of map + find that returns the first Some that is found after applying the map operation.

  12. def findMappedFuture[B](f: (A) ⇒ Future[Option[B]])(implicit ec: ExecutionContext): Future[Option[B]]

    Permalink

    Like findMapped except works with Futures.

    Like findMapped except works with Futures. Executes the futures one at a time until one with a defined result is found.

  13. def foreachWithIndex[U](f: (A, Int) ⇒ U): Unit

    Permalink
  14. def foreachWithLongIndex[U](f: (A, Long) ⇒ U): Unit

    Permalink
  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. def maxOption[B >: A](implicit ord: Ordering[B]): Option[A]

    Permalink
  19. def minOption[B >: A](implicit ord: Ordering[B]): Option[A]

    Permalink
  20. def mkStringOrBlank(start: String, sep: String, end: String): String

    Permalink

    Same as mkString except if the TraversableOnce is empty then an empty string is returned instead of the start and end params.

  21. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  23. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  24. val self: COL

    Permalink
  25. def sortByCached[K](f: (A) ⇒ K)(implicit ord: Ordering[K]): IndexedSeq[A]

    Permalink

    Like the normal sortBy but will cache the result of calling f on each element (i.e.

    Like the normal sortBy but will cache the result of calling f on each element (i.e. f is only called once for each element). This is useful when f is an expensive function and not just a single field access on the element.

    If this is call on something that isn't already an IndexedSeq then it will be automatically converted before sorting.

  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  27. def toHashMap[K, V](implicit ev: <:<[A, (K, V)]): HashMap[K, V]

    Permalink

    Like .toMap but creates an immutable.HashMap

  28. def toHashSet: HashSet[A]

    Permalink

    Like .toSet but creates an immutable.HashSet

  29. def toMultiValuedLowerAlphaNumericMap[V](implicit ev: <:<[A, (String, V)]): HashMap[String, IndexedSeq[V]]

    Permalink
  30. def toMultiValuedMap[K, V](implicit ev: <:<[A, (K, V)]): HashMap[K, Vector[V]]

    Permalink

    Like .toHashMap except allows multiple values per key

    Like .toHashMap except allows multiple values per key

    TODO: Change this to IndexedSeq so we can switch to ImmutableArray (if we want to)

  31. def toMultiValuedMapUsing[K](toKey: (A) ⇒ K): HashMap[K, IndexedSeq[A]]

    Permalink

    Like .groupBy but gives you an immutable.HashMap[K, IndexedSeq[A]]

  32. def toMultiValuedMapUsingKeys[K](toKeys: (A) ⇒ TraversableOnce[K]): HashMap[K, IndexedSeq[A]]

    Permalink

    Like .groupBy but gives you an immutable.HashMap[K, IndexedSeq[A]]

  33. def toMultiValuedMapWithKeyTransform[K, V, K2](keyTransform: (K) ⇒ K2)(implicit ev: <:<[A, (K, V)]): HashMap[K2, Vector[V]]

    Permalink

    Same as toMultiValuedMap but allows you to specify a transform function for the key

    Same as toMultiValuedMap but allows you to specify a transform function for the key

    TODO: Change this to IndexedSeq so we can switch to ImmutableArray (if we want to)

  34. def toMultiValuedMapWithTransforms[K, V, K2, V2](keyTransform: (K) ⇒ K2, valueTransform: (V) ⇒ V2)(implicit ev: <:<[A, (K, V)]): HashMap[K2, Vector[V2]]

    Permalink

    Same as toMultiValuedMap but allows you to specify transform functions for the key and value

    Same as toMultiValuedMap but allows you to specify transform functions for the key and value

    TODO: Change this to IndexedSeq so we can switch to ImmutableArray (if we want to)

  35. def toMultiValuedURLNameMap[V](implicit ev: <:<[A, (String, V)]): HashMap[String, IndexedSeq[V]]

    Permalink
  36. def toSortedSet(implicit ord: Ordering[A]): SortedSet[A]

    Permalink

    Like .toSet but returns a scala.collection.immutable.SortedSet instead

  37. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  38. def toUniqueHashMap[K, V](implicit ev: <:<[A, (K, V)]): HashMap[K, V]

    Permalink

    Same as .toHashMap but ensures there are no duplicate keys

  39. def toUniqueHashMapUsing[K](f: (A) ⇒ K): HashMap[K, A]

    Permalink

    Alias of uniqueGroupBy

  40. def toUniqueHashMapWithKeyTransform[K, V, K2](keyTransform: (K) ⇒ K2)(implicit ev: <:<[A, (K, V)]): HashMap[K2, V]

    Permalink

    Same as toUniqueHashMap but allows you to specify a transform function for the key

  41. def toUniqueHashMapWithTransforms[K, V, K2, V2](keyTransform: (K) ⇒ K2, valueTransform: (V) ⇒ V2)(implicit ev: <:<[A, (K, V)]): HashMap[K2, V2]

    Permalink

    Same as toUniqueHashMap but allows you to specify transform functions for the key and value

  42. def toUniqueHashSet: HashSet[A]

    Permalink

    Like .toHashSet but makes sure there are no duplicates

  43. def toUniqueLowerAlphaNumericMap[V](implicit ev: <:<[A, (String, V)]): HashMap[String, V]

    Permalink
  44. def toUniqueMap[K, V](implicit ev: <:<[A, (K, V)]): HashMap[K, V]

    Permalink

    Same as .toMap but ensures there are no duplicate keys

  45. def toUniqueSet: Set[A]

    Permalink

    Like .toSet but makes sure there are no duplicates

  46. def toUniqueURLNameMap[V](implicit ev: <:<[A, (String, V)]): HashMap[String, V]

    Permalink
  47. def toVector: Vector[A]

    Permalink

    Returns a Vector of this Iterable (if it's not already a Vector)

  48. def uniqueGroupBy[K](f: (A) ⇒ K): HashMap[K, A]

    Permalink

    Like groupBy but only allows a single value per key

  49. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  50. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped