Class

molecule.stream.ichan

DelayedIChan

Related Doc: package ichan

Permalink

class DelayedIChan[A] extends IChan[A]

Linear Supertypes
IChan[A], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. DelayedIChan
  2. IChan
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DelayedIChan(ichan: IChan[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. def ++:[B](s: Seg[B]): IChan[B]

    Permalink

    [use case]

    [use case]
    returns

    an input which produces the segment and which continues with the remaining of the stream.

    Definition Classes
    IChan
    Full Signature

    def ++:[B >: A](seg: Seg[B])(implicit arg0: Message[B]): IChan[B]

  4. def +:(x: A): IChan[A]

    Permalink

    [use case]

    [use case]
    x

    the message to prepend.

    returns

    an input which produces x as first message and which continues with the remaining of the stream.

    Definition Classes
    IChan
    Full Signature

    def +:[B >: A](b: B)(implicit arg0: Message[B]): IChan[B]

  5. def ::(x: A): IChan[A]

    Permalink

    [use case]

    [use case]
    x

    the message to prepend.

    returns

    an input which produces x as first message and which continues with the remaining of the stream.

    Definition Classes
    IChan
    Full Signature

    def ::[B >: A](b: B)(implicit arg0: Message[B]): IChan[B]

  6. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  7. def >>\[B](f: (A, IChan[A]) ⇒ IChan[B])(implicit ma: Message[A], mb: Message[B]): IChan[B]

    Permalink

    Operator equivalent to flatMap

    Operator equivalent to flatMap

    Definition Classes
    IChan
  8. def add[B](transformer: Transformer[A, B])(implicit arg0: Message[B]): IChan[B]

    Permalink

    Add a transformer to this channel.

    Add a transformer to this channel.

    returns

    the transformed channel

    Definition Classes
    DelayedIChanIChan
  9. def append[B >: A](next: ⇒ IChan[B]): IChan[B]

    Permalink

    Append a stream after this stream only if this stream terminates normally with EOS.

    Append a stream after this stream only if this stream terminates normally with EOS.

    next

    the stream to append.

    returns

    the appended stream.

    Definition Classes
    IChan
  10. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def collect[B](pf: PartialFunction[A, B]): IChan[B]

    Permalink

    [use case]

    [use case]
    B

    the message type of the returned input channel.

    pf

    the partial function which filters and maps the stream elements.

    returns

    a new input resulting from applying the partial function pf to each message on which it is defined. The order of the messages is preserved.

    Definition Classes
    IChan
    Full Signature

    def collect[B](f: PartialFunction[A, B])(implicit ma: Message[A], mb: Message[B]): IChan[B]

  13. def complexity: Int

    Permalink

    Tracks the complexity, that is the number of transformations stacked up on this channel.

    Tracks the complexity, that is the number of transformations stacked up on this channel.

    returns

    the complexity

    Definition Classes
    DelayedIChanIChan
  14. def compress[B](f: (Seg[A]) ⇒ B)(implicit arg0: Message[B]): IChan[B]

    Permalink

    Builds a new input that compresses the content of each segment into a single value.

    Builds a new input that compresses the content of each segment into a single value.

    f

    A function converting segments to a single value.

    returns

    The compressed input.

    Definition Classes
    IChan
  15. def connect[B >: A](ochan: OChan[B]): Process[Either[Signal, Signal]]

    Permalink

    Transfer the content of this input to an output.

    Transfer the content of this input to an output. The input/output will be closed with the same signal as the output/input.

    returns

    stream whose result indicates which channel was closed first (Left for ichan, Right for ochan)

    Definition Classes
    IChan
  16. def debug(label: String, f: (A) ⇒ String = _.toString)(implicit ma: Message[A]): IChan[A]

    Permalink

    Builds a new debugging input that prints every message received.

    Builds a new debugging input that prints every message received.

    label

    the label to put in front of each debug line.

    f

    A function converting messages to a string (defaults to _.toString).

    returns

    The same input excepted each message will be printed.

    Definition Classes
    IChan
  17. def drop(n: Int)(implicit ma: Message[A]): IChan[A]

    Permalink

    Selects all elements except first n ones.

    Selects all elements except first n ones.

    n

    the number of elements to drop from this stream.

    returns

    an input consisting of all elements of this input except the first n ones.

    Definition Classes
    IChan
  18. def dropWhile(p: (A) ⇒ Boolean)(implicit ma: Message[A]): IChan[A]

    Permalink

    Skips longest sequence of elements of this input which satisfy given predicate p, and returns an input of the remaining elements.

    Skips longest sequence of elements of this input which satisfy given predicate p, and returns an input of the remaining elements.

    p

    the predicate used to skip elements.

    returns

    an input producing the remaining elements

    Definition Classes
    IChan
  19. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  21. def filter(p: (A) ⇒ Boolean)(implicit ma: Message[A]): IChan[A]

    Permalink

    Selects all messages of this input which satisfy a predicate.

    Selects all messages of this input which satisfy a predicate.

    p

    the predicate used to test messages.

    returns

    a new input consisting of all messages of this input that satisfy the given predicate p. The order of the messages is preserved.

    Definition Classes
    IChan
  22. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  23. def flatMap[B](f: (A, IChan[A]) ⇒ IChan[B]): IChan[B]

    Permalink

    [use case]

    [use case]
    B

    the element produced by the parser.

    f

    the function.

    returns

    a new segment resulting from applying the given collection-valued function f to each message of this segment and concatenating the results.

    Definition Classes
    IChan
    Full Signature

    def flatMap[C >: A, B, D](parser: Parser[C, B], f: (B, IChan[C]) ⇒ IChan[D])(implicit mb: Message[C]): IChan[D]

  24. def flatMap[B](f: (A, IChan[A]) ⇒ IChan[B]): IChan[B]

    Permalink

    [use case]

    [use case]
    B

    the message type of the returned input channel.

    f

    the function.

    returns

    a new segment resulting from applying the given collection-valued function f to each message of this segment and concatenating the results.

    Definition Classes
    IChan
    Full Signature

    def flatMap[B](f: (A, IChan[A]) ⇒ IChan[B])(implicit ma: Message[A], mb: Message[B]): IChan[B]

  25. def flatMapSeg[B](f: (A) ⇒ Seg[B]): Seg[B]

    Permalink

    [use case]

    [use case]
    B

    the message type of the returned collection.

    f

    the function to apply to each message.

    returns

    a new segment resulting from applying the given collection-valued function f to each message of this channel and concatenating the results.

    Definition Classes
    IChan
    Full Signature

    def flatMapSeg[B](f: (A) ⇒ Seg[B])(implicit ma: Message[A], mb: Message[B]): IChan[B]

  26. def flatten[B]: IChan[B]

    Permalink

    [use case]

    [use case]
    B

    the type of the messages of each traversable collection.

    returns

    a new input resulting from concatenating all the Traversable collections.

    Definition Classes
    IChan
    Full Signature

    def flatten[B](implicit asTraversable: (A) ⇒ Traversable[B], message: Message[B]): IChan[B]

  27. def fold[B](z: B)(op: (B, A) ⇒ B)(implicit arg0: Message[B]): Process[B]

    Permalink

    Applies a binary operator to a start value and all messages of this channel, going left to right.

    Applies a binary operator to a start value and all messages of this channel, going left to right.

    B

    the result type of the binary operator.

    z

    the start value.

    op

    the binary operator.

    returns

    the result of inserting op between consecutive messages of this channel, going left to right with the start value z on the left:

    op(...op(z, x,,1,,), x,,2,,, ..., x,,n,,)

    where x1, ..., xn are the messages of this segment.

    Definition Classes
    IChan
  28. def foreach[B](f: (A) ⇒ B): Process[Unit]

    Permalink

    Apply sequentially a side effectful function to each message in the stream.

    Apply sequentially a side effectful function to each message in the stream.

    f

    the effectful function that will be applied to each element of the sequence

    returns

    stream whose result indicates the termination of the foreach operation.

    Definition Classes
    IChan
  29. def forward[B >: A](ochan: OChan[B]): Process[(IChan[B], OChan[B])]

    Permalink

    Forward asynchronously the content of this input to an output.

    Forward asynchronously the content of this input to an output. It stops as soon as one of the two channel is poisoned and it does not propagate the poison signal.

    returns

    A stream that returns the channels after the forward operation. If the stream completed successfully the input channel will be closed, otherwise the output channel is poisoned.

    Definition Classes
    IChan
  30. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  31. def grouped(size: Int)(implicit ma: Message[A]): IChan[Seg[A]]

    Permalink

    Returns an input which groups messages produced by this input into fixed size blocks.

    Returns an input which groups messages produced by this input into fixed size blocks. The last group may contain less messages the number of messages receives is not a multiple of the group size.

    size

    the size of the groups.

    returns

    an input producing the groups

    Definition Classes
    IChan
  32. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  33. def interleave[B](right: IChan[B], closeIfLeftClosed: Boolean = false, closeIfRightClosed: Boolean = false)(implicit ma: Message[A], mb: Message[B]): IChan[Either[A, B]]

    Permalink

    Interleave the messages produced asynchronously on this channel with the messages produced on an other channel.

    Interleave the messages produced asynchronously on this channel with the messages produced on an other channel. This builds a new input channel that produces one message of type Either[A, B] for every message produce on this or the other channel, where A is the type of messages produced on this channel and B is the type of messages produced on the other channel. By default, the resulting channel is closed when both input channels are closed.

    right

    the other input channel

    closeIfLeftClosed

    flag that indicating if the resulting channel must be closed if this channel is closed.

    closeIfRightClosed

    flag that indicating if the resulting channel must be closed if the other channel is closed.

    returns

    a new input channel that produces messages of type Either[A, B] for every message produced on this or the other channel

    Definition Classes
    IChan
  34. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  35. def join[B]: IChan[B]

    Permalink

    [use case]

    [use case]
    B

    the type of the messages of sub-streams.

    returns

    a new input resulting from merging all the sub-streams.

    Definition Classes
    IChan
    Full Signature

    def join[B](implicit asIChan: (A) ⇒ IChan[B], ma: Message[A], mb: Message[B]): IChan[B]

  36. def join[B](right: IChan[B])(implicit ma: Message[A], mb: Message[B]): IChan[(A, B)]

    Permalink

    Join the messages produced asynchronously on this channel with the messages produced on an other channel.

    Join the messages produced asynchronously on this channel with the messages produced on an other channel. This builds a new input channel that produces tuples of type (A, B) each time a new message of type A or B is available, where A is the type of messages produced on this channel and B is the type of messages produced on the other channel. The resulting channel is closed both input channels are closed.

    right

    the other input channel

    returns

    a new input channel that produces messages of type (A, B) for every message produced on this or the other channel

    Definition Classes
    IChan
  37. def map[B](f: (A) ⇒ B): IChan[B]

    Permalink

    [use case]

    [use case]
    B

    the message type of the returned input.

    f

    the function to apply to each message.

    returns

    a new input resulting from applying the given function f to each message of this input.

    Definition Classes
    IChan
    Full Signature

    def map[B](f: (A) ⇒ B)(implicit arg0: Message[B]): IChan[B]

  38. def mapMany[B](f: (A) ⇒ IChan[B]): IChan[B]

    Permalink

    [use case]

    [use case]
    B

    the type of the messages of input streams created by f.

    f

    a function that creates new input streams from each element of this stream.

    returns

    a new input resulting from merging all the streams created by applying f to each elements of this stream.

    Definition Classes
    IChan
    Full Signature

    def mapMany[B](f: (A) ⇒ IChan[B])(implicit ma: Message[A], mb: Message[B]): IChan[B]

  39. def mapP[B](f: (A) ⇒ Process[B]): IChan[B]

    Permalink

    [use case]

    [use case]
    B

    the message type of the returned input.

    f

    the function to apply to each message.

    returns

    a new input resulting from applying the given function f to each message of this input.

    Definition Classes
    IChan
    Full Signature

    def mapP[B](f: (A) ⇒ Process[B])(implicit ma: Message[A], mb: Message[B]): IChan[B]

  40. def mapSeg[B](f: (Seg[A]) ⇒ Seg[B]): IChan[B]

    Permalink

    [use case]

    [use case]
    B

    the message type of the returned input.

    f

    the function to apply to each message.

    returns

    a new input resulting from applying the given function f to each segment of this input.

    Definition Classes
    IChan
    Full Signature

    def mapSeg[B](f: (Seg[A]) ⇒ Seg[B])(implicit arg0: Message[B]): IChan[B]

  41. def merge[B >: A](right: IChan[B])(implicit mb: Message[B]): IChan[B]

    Permalink

    Merge the streams of two channels.

    Merge the streams of two channels. This builds a new input channel that produces messages from this channel and the other channel.

    right

    the other input channel

    returns

    a new input channel that produces messages coming on both input channels

    Definition Classes
    IChan
  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 onError[B >: A](next: ⇒ IChan[B]): IChan[B]

    Permalink

    Append a stream after this stream only if this stream terminates abnormally with a signal that is not EOS.

    Append a stream after this stream only if this stream terminates abnormally with a signal that is not EOS.

    next

    the stream to append in case of an error signal.

    returns

    the appended stream.

    Definition Classes
    IChan
  46. def onSignal[B >: A](next: PartialFunction[Signal, IChan[B]]): IChan[B]

    Permalink

    Append a stream after this stream if this stream terminates with the signal for which the partial function is defined.

    Append a stream after this stream if this stream terminates with the signal for which the partial function is defined.

    next

    the partial function returning the stream to append if the signal matches the signal(s) for which it is defined.

    returns

    the appended stream.

    Definition Classes
    IChan
  47. def parse[C >: A, B](parse: Parser[C, B])(implicit arg0: Message[C], arg1: Message[B]): IChan[B]

    Permalink

    Produces an input resulting from applying a repeatedly a parser combinator to this input stream.

    Produces an input resulting from applying a repeatedly a parser combinator to this input stream.

    C

    the type of the messages parsed

    B

    the type of the messages in the resulting input

    returns

    input with parsed results

    Definition Classes
    IChan
  48. def poison(signal: Signal): Unit

    Permalink

    Poison this channel.

    Poison this channel. Any pending read continuation will be invoked with Seg.Nil and NilIChan(signal) as argument.

    signal

    the signal

    Definition Classes
    DelayedIChanIChan
  49. def read(t: UThread, k: (Seg[A], IChan[A]) ⇒ Unit): Unit

    Permalink

    Read a segment on this channel.

    Read a segment on this channel.

    t

    the user-level thread

    k

    the continuation invoked if there is a message

    Definition Classes
    DelayedIChanIChan
  50. def scan[B](z: B)(f: (B, A) ⇒ B)(implicit arg0: Message[B]): IChan[B]

    Permalink

    Produces a collection containing cummulative results of applying the operator going first to last message.

    Produces a collection containing cummulative results of applying the operator going first to last message.

    B

    the type of the messages in the resulting input

    z

    the initial value

    returns

    input with intermediate results

    Definition Classes
    IChan
  51. def smap[S, B](z: S)(fsm: (S, A) ⇒ (S, B))(implicit arg0: Message[B]): IChan[B]

    Permalink

    Produces an input containing cummulative results of applying the operator going first to last message.

    Produces an input containing cummulative results of applying the operator going first to last message.

    B

    the type of the messages in the resulting input

    z

    the initial state

    returns

    input with intermediate results

    Definition Classes
    IChan
  52. def span(p: (A) ⇒ Boolean)(implicit ma: Message[A]): IChan[A]

    Permalink

    Create an input that produces longest sequence of this input that satisfy predicate p.

    Create an input that produces longest sequence of this input that satisfy predicate p. The input stream is poisoned after the the conforming messages have been consumed.

    p

    the predicate to satisfy

    returns

    an input producing only of the first messages that satisfy the predicate.

    Definition Classes
    IChan
  53. def span[B >: A](p: (B) ⇒ Boolean, tailK: (IChan[B]) ⇒ IChan[B])(implicit ma: Message[B]): IChan[B]

    Permalink

    Create an input that produces longest sequence of this input that satisfy predicate p.

    Create an input that produces longest sequence of this input that satisfy predicate p.

    p

    the predicate to satisfy

    tailK

    a function that takes the remaining of the stream as argument

    returns

    an input producing only of the first messages that satisfy the predicate.

    Definition Classes
    IChan
  54. def step(t: platform.UThread)(more: (A, IChan[A]) ⇒ Unit)(empty: (Signal) ⇒ Unit)(implicit m: Message[A]): Unit

    Permalink

    Read one message on this channel.

    Read one message on this channel.

    t

    the user-level thread

    more

    the continuation invoked if there is a message

    empty

    the continuation invoked if the channel is closed

    Definition Classes
    IChan
  55. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  56. def take(size: Int)(implicit ma: Message[A]): IChan[A]

    Permalink

    Create an input that produces first n messages of this input.

    Create an input that produces first n messages of this input. The input stream is poisoned after the n messages have been consumed.

    returns

    an input producing only of the first n messages of this input, or less than n messages if the input produces less messages.

    Definition Classes
    IChan
  57. def take[B >: A](n: Int, tailK: (IChan[B]) ⇒ IChan[B])(implicit ma: Message[B]): IChan[B]

    Permalink

    Create an input that produces first n messages of this input.

    Create an input that produces first n messages of this input.

    n

    the number of messages to take

    tailK

    a function that takes the remaining of the stream as argument if it is not terminated

    returns

    an input producing only of the first n messages of this input, or less than n messages if the input produces less messages.

    Definition Classes
    IChan
  58. def takeUntil[B](splitter: IChan[B])(implicit ma: Message[A], mb: Message[B]): IChan[A]

    Permalink

    Create an input that produces messages of this input until an event occurs.

    Create an input that produces messages of this input until an event occurs. The input stream is poisoned after the n messages have been consumed.

    splitter

    a channel that delivers the message that will split the current channel.

    returns

    an input producing messages of this input until the splitter produces and event, or all the messages if the splitter never delivers an event.

    Definition Classes
    IChan
  59. def takeUntil[B >: A, C](splitter: IChan[C], tailK: (Either[Signal, (C, IChan[C], IChan[B])]) ⇒ IChan[B])(implicit ma: Message[B], mc: Message[C]): IChan[B]

    Permalink

    Create an input that produces messages of this input until an event occurs.

    Create an input that produces messages of this input until an event occurs.

    splitter

    a channel that delivers the message that will split the current channel

    tailK

    a function that takes the remaining of the stream as argument if it is not terminated. tailK is invoked with the signal from the splitter if it is terminated.

    returns

    an input producing messages of this input until the splitter produces and event, or all the messages if the splitter never delivers an event.

    Definition Classes
    IChan
  60. def testable(implicit ma: Message[A]): TestableIChan[A]

    Permalink
    Definition Classes
    IChan
  61. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  65. def zip[B](right: IChan[B])(implicit ma: Message[A], mb: Message[B]): IChan[(A, B)]

    Permalink

    Zip and hence synchronize the streams of two channels.

    Zip and hence synchronize the streams of two channels. This builds a new input channel that produces pair of messages from this channel and the other channel.

    right

    the other input channel

    returns

    a new input channel that produces pairs of messages coming on both input channels

    Definition Classes
    IChan
  66. def zipWithBigIndex: IChan[(A, BigDecimal)]

    Permalink

    [use case]

    [use case]
    returns

    A new stream containing pairs consisting of all elements of this stream paired with their index. Indices start at 0.

    Definition Classes
    IChan
    Full Signature

    def zipWithBigIndex(implicit ma: Message[A]): IChan[(A, BigDecimal)]

    Example:
    1. IChan("a", "b", "c").zipWithIndex = IChan(("a", 0), ("b", 1), ("c", 2))

  67. def zipWithIndex: IChan[(A, Long)]

    Permalink

    [use case]

    [use case]
    returns

    A new stream containing pairs consisting of all elements of this stream paired with their index. Indices start at 0.

    Definition Classes
    IChan
    Full Signature

    def zipWithIndex(implicit ma: Message[A]): IChan[(A, Long)]

    Example:
    1. IChan("a", "b", "c").zipWithIndex = IChan(("a", 0), ("b", 1), ("c", 2))

Inherited from IChan[A]

Inherited from AnyRef

Inherited from Any

Ungrouped