Class

scales.utils.iteratee

IterateeFunctions

Related Doc: package iteratee

Permalink

class IterateeFunctions[F[_]] extends AnyRef

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

Instance Constructors

  1. new IterateeFunctions(F: Monad[F])

    Permalink

Type Members

  1. type ResumableIter[E, A] = IterateeT[E, F, (A, IterateeT[E, F, _])]

    Permalink
  2. type ResumableIterList[E, A] = IterateeT[E, F, (Iterable[A], IterateeT[E, F, _])]

    Permalink
  3. type ResumableIterListStep[E, A] = StepT[E, F, (Iterable[A], IterateeT[E, F, _])]

    Permalink
  4. type ResumableStep[E, A] = StepT[E, F, (A, IterateeT[E, F, _])]

    Permalink
  5. type TheF[X] = F[X]

    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. object EphemeralStreamEnum

    Permalink
  5. val F: Monad[F]

    Permalink
  6. object IterateeImplicits

    Permalink
  7. def appendTo(to: Appendable)(implicit F: Applicative[F]): IterateeT[CharSequence, F, CharSequence]

    Permalink

    Append to an appendable, always returns Done for a line, cont for everything else TODO - should it be a pair including the appendable?

    Append to an appendable, always returns Done for a line, cont for everything else TODO - should it be a pair including the appendable?

    Annotations
    @inline()
  8. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def dropWhile[E](f: (E) ⇒ Boolean)(implicit F: Monad[F]): IterateeT[E, F, Option[E]]

    Permalink

    drop while iteratee, returning the possibly remaining data

    drop while iteratee, returning the possibly remaining data

    Annotations
    @inline()
  11. def dropWhileM[E](f: (E) ⇒ F[Boolean])(implicit F: Monad[F]): IterateeT[E, F, Option[E]]

    Permalink

    Same as dropWhile but captures the Monad in F

    Same as dropWhile but captures the Monad in F

    Annotations
    @inline()
  12. def enumToMany[E, A, R](dest: ResumableIter[A, R])(toMany: ResumableIter[E, EphemeralStream[A]])(implicit F: Monad[F]): ResumableIter[E, R]

    Permalink

    Takes Input[E] converts via toMany to an EphemeralStream[A].

    Takes Input[E] converts via toMany to an EphemeralStream[A]. This in turn is fed to the destination iteratee. The inputs can be 1 -> Many, Many -> 1, or indeed 1 -> 1.

    The callers must take care of what kind of continnuation Iteratee is returned in a Done.

    If the dest returns EOF, the toMany is in turn called with EOF for any needed resource control processing.

    Annotations
    @inline()
  13. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  15. def evalWith[FROM, TO](f: (FROM) ⇒ TO)(implicit F: Applicative[F]): IterateeT[FROM, F, TO]

    Permalink

    Calls the function param with the fed data and returns its result - consider Scalaz 7 map directly rather than composing

    Calls the function param with the fed data and returns its result - consider Scalaz 7 map directly rather than composing

    Annotations
    @inline()
  16. def extract[E, A](iter: ResumableIter[E, A])(implicit F: Monad[F]): F[Option[A]]

    Permalink

    Extract the Some(value) from a Done or None if it was not Done.

    Extract the Some(value) from a Done or None if it was not Done.

    Annotations
    @inline()
  17. def extractCont[E, A](iter: ResumableIter[E, A])(implicit F: Monad[F]): ResumableIter[E, A]

    Permalink

    Extract the continuation from a Done

    Extract the continuation from a Done

    Annotations
    @inline()
  18. def extractContFromDoneOrCont[E, A](iter: ResumableIter[E, A])(implicit F: Monad[F]): ResumableIter[E, A]

    Permalink

    Extract the continuation from a Done or the cont itself

    Extract the continuation from a Done or the cont itself

    Annotations
    @inline()
  19. def extractContS[E, A](s: ResumableStep[E, A])(implicit F: Monad[F]): ResumableIter[E, A]

    Permalink

    Extract the continuation from a Done

    Extract the continuation from a Done

    Annotations
    @inline()
  20. def extractS[E, A](iter: ResumableStep[E, A])(implicit F: Monad[F]): Option[A]

    Permalink

    Extract the Some(value) from a Done or None if it was not Done.

    Extract the Some(value) from a Done or None if it was not Done.

    Annotations
    @inline()
  21. def filter[E](f: (E) ⇒ Boolean)(implicit F: Monad[F]): IterateeT[E, F, Iterable[E]]

    Permalink

    filter iteratee, greedily taking all content until eof

    filter iteratee, greedily taking all content until eof

    Annotations
    @inline()
  22. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  23. def find[E](f: (E) ⇒ Boolean)(implicit F: Monad[F]): IterateeT[E, F, Option[E]]

    Permalink

    "find" iteratee, finds Some(first) or None

    "find" iteratee, finds Some(first) or None

    Annotations
    @inline()
  24. def flatMap[E, A, B](itr: IterateeT[E, F, A])(f: (A) ⇒ IterateeT[E, F, B])(implicit F: Monad[F]): IterateeT[E, F, B]

    Permalink

    Based on Scalaz 7 flatMap but exposes the monad through the f parameter

    Based on Scalaz 7 flatMap but exposes the monad through the f parameter

    Annotations
    @inline()
  25. def foldI[E, A](f: (E, A) ⇒ A)(init: A, stopOn: (A) ⇒ Boolean = (_: A) => true)(implicit F: Monad[F]): ResumableIter[E, A]

    Permalink

    Stepwise fold, each element is evaluated but each one is returned as a result+resumable iter.

    Stepwise fold, each element is evaluated but each one is returned as a result+resumable iter.

    Annotations
    @inline()
  26. def foldIM[E, A](f: (E, A) ⇒ F[A])(init: A, stopOn: (A) ⇒ Boolean = (_: A) => true)(implicit F: Monad[F]): ResumableIter[E, A]

    Permalink

    Stepwise fold but the result of f is bound to F

    Stepwise fold but the result of f is bound to F

    Annotations
    @inline()
  27. def foldOnDone[E, A, ACC](e: ⇒ EnumeratorT[E, F])(initAcc: ACC, initResumable: ResumableIter[E, A])(f: (ACC, A) ⇒ ACC)(implicit F: Monad[F]): F[ACC]

    Permalink

    Folds over the Iteratee with Cont or Done and Empty, returning with Done and EOF.

    Folds over the Iteratee with Cont or Done and Empty, returning with Done and EOF. If there is a ping pong on enumerator -> Cont -> enumerator then we'll of course get an infinite loop.

    foldI returns a ResumableIter that performs a fold until a done, this folds over the enumerator to return a value.

    combine with onDone to get through chunks of data.

    Annotations
    @inline()
  28. def foldOnDoneIter[E, A, ACC](initAcc: ACC, initIter: ResumableIter[E, A])(f: (ACC, A) ⇒ ACC)(implicit F: Monad[F]): IterateeT[E, F, ACC]

    Permalink

    Enumeratee that folds over the Iteratee with Cont or Done and Empty, returning with Done and EOF.

    Enumeratee that folds over the Iteratee with Cont or Done and Empty, returning with Done and EOF.

    Converts ResumableIters on Done via a fold, returning Done only when receiving EOF from the initIter.

    NB - This can be thought of the reverse of toResumableIter but also accumulating.

    Annotations
    @inline()
  29. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  30. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  31. def isDone[E, A](iter: IterateeT[E, F, A])(implicit F: Monad[F]): F[Boolean]

    Permalink

    Helper to identify dones

    Helper to identify dones

    Annotations
    @inline()
  32. def isDoneS[E, A](step: StepT[E, F, A])(implicit F: Monad[F]): Boolean

    Permalink
    Annotations
    @inline()
  33. def isEOF[E, A](iter: IterateeT[E, F, A])(implicit F: Monad[F]): F[Boolean]

    Permalink

    Helper for done and eof

    Helper for done and eof

    Annotations
    @inline()
  34. def isEOFS[E, A](step: StepT[E, F, A])(implicit F: Monad[F]): Boolean

    Permalink

    Helper for done and eof

    Helper for done and eof

    Annotations
    @inline()
  35. def isEmpty[E, A](iter: IterateeT[E, F, A])(implicit F: Monad[F]): F[Boolean]

    Permalink

    Helper for done and empty

    Helper for done and empty

    Annotations
    @inline()
  36. def isEmptyS[E, A](step: StepT[E, F, A])(implicit F: Monad[F]): Boolean

    Permalink

    Helper for done and empty

    Helper for done and empty

    Annotations
    @inline()
  37. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  38. def isResumableEOF[E, A](iter: ResumableIter[E, A])(implicit F: Monad[F]): F[Boolean]

    Permalink

    is this iteratee actually "empty"

    is this iteratee actually "empty"

    Annotations
    @inline()
  39. def isResumableEOFS[E, A](s: ResumableStep[E, A])(implicit F: Monad[F]): Boolean

    Permalink
    Annotations
    @inline()
  40. def iteratorEnumerator[E](iter: Iterator[E])(implicit F: Monad[F]): EnumeratorT[E, F]

    Permalink
    Annotations
    @inline()
  41. def mapTo[E, A](f: (E) ⇒ Input[EphemeralStream[A]])(implicit F: Applicative[F]): IterateeT[E, F, EphemeralStream[A]]

    Permalink

    Maps a given input to a function returning a Input[EphemeralStream].

    Maps a given input to a function returning a Input[EphemeralStream]. If the Input is El it returns it, if EOF empty and continues on empty.

    Annotations
    @inline()
  42. final def ne(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef
  44. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  45. def onDone[E, A](originalList: List[ResumableIter[E, A]])(implicit F: Monad[F]): ResumableIterList[E, A]

    Permalink

    onDone, iterates over the list of iteratees applying the element, when the resulting list contains a Done then the list of Dones is returned.

    onDone, iterates over the list of iteratees applying the element, when the resulting list contains a Done then the list of Dones is returned.

    One can use tuples or pattern matching to discern which of the original lists iteratees have matched.

    Due to the return type of this iteratee all items in the list must return the same type and must return both an A and an IterV with the same interface to continue with the next and maintain state.

    In the case of EOF, an empty list is returned

    Annotations
    @inline()
  46. def repeatUntil[E, A](init: A)(f: (A) ⇒ A)(stopOn: (A) ⇒ Boolean)(implicit F: Monad[F]): F[(A, ResumableIter[A, A])]

    Permalink

    Repeating fold on done, calling f with the result to accumulate with side effects, stopping when stopOn is true and returns the accumulated value continuation iteratee pair.

  47. def repeatUntilM[E, A](init: A)(f: (A) ⇒ F[A])(stopOn: (A) ⇒ Boolean)(implicit F: Monad[F]): F[(A, ResumableIter[A, A])]

    Permalink

    Repeating fold on done, calling f with the result to accumulate with side effects, stopping when stopOn is true and returns the accumulated value continuation iteratee pair.

  48. def resumableEOF[E, A](input: A = null)(implicit F: Monad[F]): ResumableIter[E, A]

    Permalink

    marks a continuation resumableiter as actually being EOF - i.e.

    marks a continuation resumableiter as actually being EOF - i.e. don't attempt to evaluate it

    Annotations
    @inline()
  49. def resumableEOFDone[E, A](input: A)(implicit F: Monad[F]): ResumableStep[E, A]

    Permalink
    Annotations
    @inline()
  50. def runningCount[E](implicit F: Monad[F]): functions.ResumableIter[E, F, Long]

    Permalink

    keeps a running count of each element, probably not of much use unless combined but acts as a good poc for ResumableIter

    keeps a running count of each element, probably not of much use unless combined but acts as a good poc for ResumableIter

    Annotations
    @inline()
  51. def sum[T](implicit n: Numeric[T], F: Applicative[F]): IterateeT[T, F, T]

    Permalink

    Sums an iteratee up, consider using the Scalaz IterateeT monadic sum instead

    Sums an iteratee up, consider using the Scalaz IterateeT monadic sum instead

    Annotations
    @inline()
  52. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  53. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  54. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  55. final def wait(arg0: Long, arg1: Int): Unit

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

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

Deprecated Value Members

  1. def enumerateeMap[E, A, R](target: IterateeT[A, F, R])(f: (E) ⇒ A)(implicit F: Monad[F]): IterateeT[E, F, R]

    Permalink

    Enumeratee that converts input 1:1 String => Int, enumerator Iterator[String] but IterV[Int, Int]

    Enumeratee that converts input 1:1 String => Int, enumerator Iterator[String] but IterV[Int, Int]

    Annotations
    @deprecated @inline()
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped