Class/Object

molecule.stream.ichan

NilIChan

Related Docs: object NilIChan | package ichan

Permalink

class NilIChan extends IChan[Nothing] with TestableIChan[Nothing]

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

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 >: Nothing](seg: Seg[B])(implicit arg0: Message[B]): IChan[B]

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

    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 >: Nothing](b: B)(implicit arg0: Message[B]): IChan[B]

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

    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 >: Nothing](b: B)(implicit arg0: Message[B]): IChan[B]

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

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

    Permalink

    Operator equivalent to flatMap

    Operator equivalent to flatMap

    Definition Classes
    IChan
  8. def add[B](transformer: Transformer[Nothing, 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
    NilIChanIChan
  9. def append[B >: Nothing](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[Nothing, 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[Nothing, B])(implicit ma: Message[Nothing], 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
    NilIChanIChan
  14. def compress[B](f: (Seg[Nothing]) ⇒ 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 >: Nothing](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: (Nothing) ⇒ String = _.toString)(implicit ma: Message[Nothing]): IChan[Nothing]

    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[Nothing]): IChan[Nothing]

    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: (Nothing) ⇒ Boolean)(implicit ma: Message[Nothing]): IChan[Nothing]

    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: (Nothing) ⇒ Boolean)(implicit ma: Message[Nothing]): IChan[Nothing]

    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: (Nothing, IChan[Nothing]) ⇒ 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 >: Nothing, B, D](parser: Parser[C, B], f: (B, IChan[C]) ⇒ IChan[D])(implicit mb: Message[C]): IChan[D]

  24. def flatMap[B](f: (Nothing, IChan[Nothing]) ⇒ 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: (Nothing, IChan[Nothing]) ⇒ IChan[B])(implicit ma: Message[Nothing], mb: Message[B]): IChan[B]

  25. def flatMapSeg[B](f: (Nothing) ⇒ 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: (Nothing) ⇒ Seg[B])(implicit ma: Message[Nothing], 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: (Nothing) ⇒ Traversable[B], message: Message[B]): IChan[B]

  27. def fold[B](z: B)(op: (B, Nothing) ⇒ 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: (Nothing) ⇒ 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 >: Nothing](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[Nothing]): IChan[Seg[Nothing]]

    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[Nothing], mb: Message[B]): IChan[Either[Nothing, 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: (Nothing) ⇒ IChan[B], ma: Message[Nothing], mb: Message[B]): IChan[B]

  36. def join[B](right: IChan[B])(implicit ma: Message[Nothing], mb: Message[B]): IChan[(Nothing, 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: (Nothing) ⇒ 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: (Nothing) ⇒ B)(implicit arg0: Message[B]): IChan[B]

  38. def mapMany[B](f: (Nothing) ⇒ 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: (Nothing) ⇒ IChan[B])(implicit ma: Message[Nothing], mb: Message[B]): IChan[B]

  39. def mapP[B](f: (Nothing) ⇒ 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: (Nothing) ⇒ Process[B])(implicit ma: Message[Nothing], mb: Message[B]): IChan[B]

  40. def mapSeg[B](f: (Seg[Nothing]) ⇒ 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[Nothing]) ⇒ Seg[B])(implicit arg0: Message[B]): IChan[B]

  41. def merge[B >: Nothing](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 >: Nothing](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 >: Nothing](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 >: Nothing, 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
    NilIChanIChan
  49. def read(t: UThread, k: (Seg[Nothing], IChan[Nothing]) ⇒ Unit): Nothing

    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
    NilIChanIChan
  50. def scan[B](z: B)(f: (B, Nothing) ⇒ 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. val signal: Signal

    Permalink
  52. def smap[S, B](z: S)(fsm: (S, Nothing) ⇒ (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
  53. def span(p: (Nothing) ⇒ Boolean)(implicit ma: Message[Nothing]): IChan[Nothing]

    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
  54. def span[B >: Nothing](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
  55. def step(t: platform.UThread)(more: (Nothing, IChan[Nothing]) ⇒ Unit)(empty: (Signal) ⇒ Unit)(implicit m: Message[Nothing]): 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
  56. final def synchronized[T0](arg0: ⇒ T0): T0

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

    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
  58. def take[B >: Nothing](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
  59. def takeUntil[B](splitter: IChan[B])(implicit ma: Message[Nothing], mb: Message[B]): IChan[Nothing]

    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
  60. def takeUntil[B >: Nothing, 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
  61. def test(thread: UThread, ready: (IChan[Nothing]) ⇒ Unit): Unit

    Permalink

    The test operation is idempotent meaning that it can be invoked multiple times.

    The test operation is idempotent meaning that it can be invoked multiple times.

    A test extracts data from its underlying ichan and invokes the ready function on a buffered ichan if a segment is available or on the NilIChan if the underlying ichan is closed.

    The contract is the following: - Any channel buffering a non-empty segment is ready - A channel that contains an empty segment followed by a terminated channel is ready - A channel that contains an empty segment followed by a live channel is NOT ready

    Definition Classes
    NilIChanTestableIChan
  62. def testable(implicit ma: Message[Nothing]): TestableIChan[Nothing]

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  67. def zip[B](right: IChan[B])(implicit ma: Message[Nothing], mb: Message[B]): IChan[(Nothing, 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
  68. def zipWithBigIndex: IChan[(Nothing, 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[Nothing]): IChan[(Nothing, BigDecimal)]

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

  69. def zipWithIndex: IChan[(Nothing, 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[Nothing]): IChan[(Nothing, Long)]

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

Inherited from TestableIChan[Nothing]

Inherited from IChan[Nothing]

Inherited from AnyRef

Inherited from Any

Ungrouped