molecule.io

Input

abstract class Input[+A] extends WInput[A] with SInput[A] with RInput[A]

A process-level input channel.

A

the type of the input's messages

Linear Supertypes
RInput[A], SInput[A], WInput[A], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Input
  2. RInput
  3. SInput
  4. WInput
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Input()

Abstract Value Members

  1. abstract def compress[B](f: (seg.Seg[A]) ⇒ B)(implicit arg0: Message[B]): Input[B]

    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
    InputSInput
  2. abstract def connect(ochan: OChan[A]): IO[RIChan[Either[Signal, Signal]]]

    Forward asynchronously the content of this input to an first-class output channel.

    Forward asynchronously the content of this input to an first-class output channel. The output will be closed with the same signal as the input. The output and input are released from this process and the method returns immediately.

    returns

    the signal indicating which channel was closed first

    Definition Classes
    RInput
  3. abstract def connect(output: Output[A]): IO[RIChan[Either[Signal, Signal]]]

    Forward asynchronously the content of this input to an output.

    Forward asynchronously the content of this input to an output. The output will be closed with the same signal as the input. The output and input are released from this process and the method returns immediately.

    output

    the output to connect to this input

    returns

    the signal indicating which channel was closed first

    Definition Classes
    RInput
  4. abstract def dropWhile(p: (A) ⇒ Boolean): Input[A]

    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
    InputSInput
  5. abstract def extract(t: UThreadContext, k: (A) ⇒ Unit, h: (Signal) ⇒ Unit): Unit

    Attributes
    protected[molecule.io]
    Definition Classes
    WInput
  6. abstract def extractSeg(t: UThreadContext, k: (seg.Seg[A]) ⇒ Unit, klast: (seg.Seg[A], Signal) ⇒ Unit): Unit

    Attributes
    protected[molecule.io]
    Definition Classes
    SInput
  7. abstract def filter(p: (A) ⇒ Boolean): Input[A]

    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
    InputSInput
  8. abstract def fold[B](z: B)(f: (B, A) ⇒ B)(implicit arg0: Message[B]): IO[B]

    Fold left

    Fold left

    Definition Classes
    SInput
  9. abstract def grouped(size: Int): Input[Seg[A]]

    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
    InputSInput
  10. abstract def interleave[B](right: RInput[B])(implicit arg0: Message[B]): IO[Input[Either[A, B]]]

    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

    returns

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

    Definition Classes
    RInput
  11. abstract def merge[B >: A](right: RInput[B])(implicit arg0: Message[B]): IO[Input[B]]

    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
    RInput
  12. abstract def parse[C >: A, B](parser: Parser[C, B])(implicit arg0: Message[C], arg1: Message[B]): Input[B]

    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

    parser

    a parser combinator

    returns

    input with parsed results

    Definition Classes
    InputSInput
  13. abstract def poison(): IO[Unit]

    Poison this input with EOS signal

    Poison this input with EOS signal

    Definition Classes
    SInput
  14. abstract def poison(signal: Signal): IO[Unit]

    Poison this input

    Poison this input

    signal

    the poisoning signal

    Definition Classes
    SInput
  15. abstract def read[C >: A, B](parser: Parser[C, B]): IO[B]

    Read a single value using a parser or raise the signal if the input is closed

    Read a single value using a parser or raise the signal if the input is closed

    B

    the type of the pareser element

    parser

    the parser used to parse a single element.

    returns

    the next element of this input.

  16. abstract def release(): IO[IChan[A]]

    Release the first-class input channel from this process.

    Release the first-class input channel from this process.

    Definition Classes
    RInput
  17. abstract def scan[B](z: B)(op: (B, A) ⇒ B)(implicit arg0: Message[B]): Input[B]

    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

    op

    the binary operator applied to the intermediate result and the message

    returns

    input with intermediate results

    Definition Classes
    InputSInput
  18. abstract def signal: Option[Signal]

    Returns some signal if the input is closed.

    Returns some signal if the input is closed.

    returns

    Some(signal) if the input contain no more elements, None otherwise.

    Definition Classes
    WInput
  19. abstract def smap[S, B](z: S)(fsm: (S, A) ⇒ (S, B))(implicit arg0: Message[B]): Input[B]

    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
    InputSInput
  20. abstract def span(p: (A) ⇒ Boolean): SInput[A]

    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 current input cannot be manipulated until the last value of the new input has been consumed.

    p

    the predicate to satisfy

    returns

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

    Definition Classes
    SInput
  21. abstract def take(size: Int): SInput[A]

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

    Create an input that produces first n messages of this input. The current input cannot be manipulated until the last value of the new input has 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
    SInput
  22. abstract def test(thread: UThread): Promise[WInput[A]]

    Test the input stream (see stream.

    Test the input stream (see stream.TestableStream).

    Attributes
    protected[molecule.io]
    Definition Classes
    WInput

Concrete 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. abstract def ++:(prefix: Seg[A]): Input[A]

    [use case]

    [use case]
    prefix

    The segment to prepend.

    returns

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

    Definition Classes
    InputSInput
    Full Signature

    abstract def ++:[B >: A](prefix: Seg[B])(implicit arg0: Message[B]): Input[B]

  5. abstract def +:(x: A): Input[A]

    [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
    InputSInput
    Full Signature

    abstract def +:[B >: A](x: B)(implicit arg0: Message[B]): Input[B]

  6. final def ::(x: A): SInput[A]

    [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
    SInput
    Full Signature

    final def ::[B >: A](x: B)(implicit arg0: Message[B]): Input[B]

  7. def <%+%>[B](right: WInput[B]): WInput[Either[A, B]]

    Create a selector that reads a value on either input unless one of them is closed.

    Create a selector that reads a value on either input unless one of them is closed. If the one of them is closed an SigInput will be raised in the enclosing scope.

    Definition Classes
    WInput
  8. def <%+>[B](right: WInput[B]): WInput[Either[A, B]]

    Create a selector that reads a value on either input unless the left one is closed.

    Create a selector that reads a value on either input unless the left one is closed. If the left input is closed an SigInput will be raised in the enclosing scope.

    Definition Classes
    WInput
  9. def <+%>[B](right: WInput[B]): WInput[Either[A, B]]

    Create a selector that reads a value on either input unless the right one is closed.

    Create a selector that reads a value on either input unless the right one is closed. If the right input is closed an SigInput will be raised in the enclosing scope.

    Definition Classes
    WInput
  10. def <+>[B](right: WInput[B]): WInput[Either[A, B]]

    Create a selector that reads a value on either input unless they are both closed.

    Create a selector that reads a value on either input unless they are both closed. If both input are closed an SigInput will be raised in the enclosing scope.

    Definition Classes
    WInput
  11. final def ==(arg0: AnyRef): Boolean

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

    Definition Classes
    Any
  13. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  14. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  15. abstract def collect[B](pf: PartialFunction[A, B]): Input[B]

    [use case]

    [use case]
    B

    the message type of the returned collection.

    pf

    the partial function which filters and maps the input.

    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
    InputSInput
    Full Signature

    abstract def collect[B](pf: PartialFunction[A, B])(implicit arg0: Message[B]): Input[B]

  16. abstract def debug[B](label: String, f: (A) ⇒ B): Input[B]

    [use case]

    [use case]
    label

    the label to put in front of each debug line.

    f

    A function converting messages to a string.

    returns

    The same input excepted each message will be printed.

    Definition Classes
    InputSInput
    Full Signature

    abstract def debug(label: String, f: (A) ⇒ String = _.toString): Input[A]

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

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

    Definition Classes
    AnyRef → Any
  19. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. abstract def flatMap[B](f: (A) ⇒ Seg[B]): Input[B]

    [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 collection-valued function f to each message of this input and concatenating the results.

    Definition Classes
    InputSInput
    Full Signature

    abstract def flatMap[B](f: (A) ⇒ Seg[B])(implicit arg0: Message[B]): Input[B]

  21. abstract def flatten[B]: Input[B]

    [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
    InputSInput
    Full Signature

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

  22. def flush(output: Output[A]): IO[Signal]

    Flush the content of this input to an output.

    Flush the content of this input to an output. It returns when this input is empty but does not close the output.

    output

    the output on which to forward this content

    returns

    the signal that closes this input

  23. def foreach(f: (A) ⇒ IO[Unit]): Unit

    [use case]

    [use case]
    f

    the function that is applied for its side-effect to every element. The result of function f is discarded.

    Definition Classes
    WInput
    Full Signature

    def foreach[U](f: (A) ⇒ IO[U]): IO[Unit]

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

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

    Definition Classes
    AnyRef → Any
  26. def isClosed: Boolean

    Tests whether this input is closed and returns the signal.

    Tests whether this input is closed and returns the signal.

    returns

    Some(signal) if the input contain no more elements, None otherwise.

    Definition Classes
    WInput
  27. def isEmpty: Boolean

    Tests whether this input is empty (or closed).

    Tests whether this input is empty (or closed).

    returns

    true if the input contain no more elements, false otherwise.

    Definition Classes
    WInput
  28. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  29. abstract def map[B](f: (A) ⇒ B): Input[B]

    [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
    InputSInput
    Full Signature

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

  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 read(): IO[A]

    Read a single value or raise the signal if the input is closed

    Read a single value or raise the signal if the input is closed

    returns

    the next element of this input.

    Definition Classes
    WInput
  34. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  35. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def close(): IO[Unit]

    Close/poison this input with EOS signal

    Close/poison this input with EOS signal

    Definition Classes
    SInput
    Annotations
    @deprecated
    Deprecated

    (Since version 3.0) Use poison instead

  2. def close(signal: Signal): IO[Unit]

    Close/poison this input

    Close/poison this input

    signal

    the poisoning signal

    Definition Classes
    SInput
    Annotations
    @deprecated
    Deprecated

    (Since version 3.0) Use poison instead

  3. def forward(output: Output[A]): IO[Signal]

    Forward the content of this input to an output.

    Forward the content of this input to an output. It returns when this input is empty but does not close the output.

    output

    the output on which to forward this content

    returns

    the signal that closes this input

    Definition Classes
    InputSInput
    Annotations
    @deprecated
    Deprecated

    (Since version 1.0) Use flush instead

Inherited from RInput[A]

Inherited from SInput[A]

Inherited from WInput[A]

Inherited from AnyRef

Inherited from Any

Ungrouped