Packages

c

ostrat

IterableExtensions

final class IterableExtensions[A] extends AnyVal

Extension methods for Traversable[A]

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

Instance Constructors

  1. new IterableExtensions(thisIter: Iterable[A])

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 fLast[B](ifEmpty: => B, fNonEmpty: (A) => B): B
  6. def foldWithPrevious[B](initPrevious: A, initAcc: B)(f: (B, A, A) => B): B
  7. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  8. def headOnly[B](ifEmpty: => B, fNonEmpty: (A) => B): B

    This method and "fHead" removes the need for headOption in the majority of case.

    This method and "fHead" removes the need for headOption in the majority of case. Use fHead when are interested in the tail value

  9. def headOrElse(vEmpty: A): A
  10. def headToStringElse(elseString: => String): String

    If the collection is nonEmpty, return head of list convert to string or return the defualt string.

  11. def iFlatMap[B, BB <: ArrBase[B]](f: (A, Int) => BB, count: Int = 0)(implicit build: ArrBuild[B, BB]): BB

    flatMaps over a traversable (collection / sequence) with a counter

  12. def iForall(f: (A, Int) => Boolean): Boolean
  13. def iForeach(f: (A, Int) => Unit, initialIndex: Int = 0): Unit

    foreach loop with index.

    foreach loop with index. The startIndex parameter is placed 2nd to allow it to have a default value of zero.

  14. def iMap[B, BB <: ArrBase[B]](f: (A, Int) => B, count: Int = 0)(implicit build: ArrBuild[B, BB]): BB

    Maps over and

  15. def ifEmpty[B](vEmpty: => B, vNonEmpty: => B): B
  16. def ifHead(f: (A) => Boolean): Boolean

    Checks condition against head.

    Checks condition against head. Returns false if the collection is empty.

  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. def iterHead[B](ifEmpty: => B, fNonEmpty: (A, Iterable[A]) => B): B
  19. def mapArr[B, BB <: ArrBase[B]](f: (A) => B)(implicit ev: ArrBuild[B, BB]): BB

    Maps to a ArrImut an immutable Array of B.

  20. def pMap[B, M <: ArrProdHomo[B]](f: (A) => B)(implicit factory: (Int) => M): M

    product map method maps from a Traversable to an Array based ProductValues class.

  21. def sumBy(f: (A) => Int): Int
  22. val thisIter: Iterable[A]
  23. def toArrProdHomo[B <: ArrProdHomo[A]](implicit factory: (Int) => B): B

    Copies from a Traversable to an Array based ProductValues class.

    Copies from a Traversable to an Array based ProductValues class. Not sure about this method or the implicit builder that underlies. It perhaps duplicates.

  24. def toImut[AA <: ArrBase[A]](implicit bu: ArrBuild[A, AA]): AA

    Converts to ArrImut of A.

    Converts to ArrImut of A. Most commonly a Refs. Prefer the mapArr method where appropriate which combines the converson with a map operation.

  25. def toStrFold2[B](secondAcc: B)(f: (B, A) => (String, B)): String
  26. def toString(): String
    Definition Classes
    Any
  27. def toStrsCommaFold(fToStr: (A) => String = _.toString): String
  28. def toStrsCommaNoSpaceFold(fToStr: (A) => String = _.toString): String
  29. def toStrsCommaParenth(fToStr: (A) => String = _.toString): String
  30. def toStrsFold(seperator: String = "", f: (A) => String = _.toString): String
  31. def toStrsSemiFold(fToStr: (A) => String = _.toString): String
  32. def toStrsSemiParenth(fToStr: (A) => String = _.toString): String

Inherited from AnyVal

Inherited from Any

Ungrouped