scales.utils.iteratee

Iteratees

trait Iteratees extends AnyRef

Collection of iterateees

Source
Iteratees.scala
Linear Supertypes
AnyRef, Any
Known Subclasses
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Iteratees
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

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

  2. class ResumableIterIterator[E, A, F[_]] extends Iterator[A]

  3. type ResumableIterList[E, A] = IterV[E, (Iterable[A], IterV[E, _])]

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def appendTo(to: Appendable): IterV[CharSequence, CharSequence]

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

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def dropWhile[E](f: (E) ⇒ Boolean): IterV[E, Option[E]]

    drop while iteratee

  10. def enumToMany[E, A, R](dest: ResumableIter[A, R])(toMany: ResumableIter[E, EphemeralStream[A]]): ResumableIter[E, R]

    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.

  11. def enumerateeMap[E, A, R](dest: IterV[A, R])(f: (E) ⇒ A): IterV[E, R]

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

  12. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  14. def evalWith[FROM, TO](f: (FROM) ⇒ TO): IterV[FROM, TO]

    Calls the function param with the fed data and returns its result

  15. def extract[E, A](iter: ResumableIter[E, A]): Option[A]

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

  16. def extractCont[E, A](iter: ResumableIter[E, A]): ResumableIter[E, A]

    Extract the continuation from a Done

  17. def filter[E](f: (E) ⇒ Boolean): IterV[E, Iterable[E]]

    filter iteratee, greedily taking all content until eof

  18. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. def find[E](f: (E) ⇒ Boolean): IterV[E, Option[E]]

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

  20. def foldI[E, A](f: (E, A) ⇒ A)(init: A): ResumableIter[E, A]

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

  21. def foldOnDone[E, A, ACC, F[_]](it: F[E])(initAcc: ACC, initResumable: ResumableIter[E, A])(f: (ACC, A) ⇒ ACC)(implicit e: Enumerator[F]): ACC

    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.

  22. def foldOnDoneIter[E, A, ACC](initAcc: ACC, initIter: ResumableIter[E, A])(f: (ACC, A) ⇒ ACC): IterV[E, ACC]

    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.

  23. final def getClass(): Class[_]

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

    Definition Classes
    AnyRef → Any
  25. def isDone[E, A](iter: IterV[E, A]): Boolean

    Helper to identify dones

  26. def isEOF[E, A](iter: IterV[E, A]): Boolean

    Helper for done and eof

  27. def isEmpty[E, A](iter: IterV[E, A]): Boolean

    Helper for done and empty

  28. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  29. def mapTo[E, A](f: (E) ⇒ Input[EphemeralStream[A]]): IterV[E, EphemeralStream[A]]

    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.

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

    Definition Classes
    AnyRef
  31. final def notify(): Unit

    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  33. def onDone[E, A](originalList: List[ResumableIter[E, A]]): ResumableIterList[E, A]

    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

  34. def runningCount[E]: ResumableIter[E, Long]

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

  35. def sum[T](implicit n: Numeric[T]): IterV[T, T]

    Sums an iteratee up

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

    Definition Classes
    AnyRef
  37. implicit def toResumableIter[E, A](oiter: IterV[E, A]): ResumableIter[E, A]

    Converts a normal IterV[E,A] to a ResumableIter.

    Converts a normal IterV[E,A] to a ResumableIter.

    Does so by folding over the iter once for an input and when its Done starting again with the original iter. This is close to restarting the iter on a new "stream", otherwise all attempts to keep the Cont will be made.

  38. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. def withIter[E, A, F[_]](it: F[E])(initResumable: ResumableIter[E, A])(implicit e: Enumerator[F]): ResumableIterIterator[E, A, F]

    Converts the iteratee/enumerator/source triple into a Iterator

Inherited from AnyRef

Inherited from Any

Ungrouped