molecule.io

SInput

trait SInput[+A] extends WInput[A]

Process-level streaming input channel interface.

A

the type of the input's messages

Source
SInput.scala
Linear Supertypes
WInput[A], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. SInput
  2. WInput
  3. AnyRef
  4. Any
Visibility
  1. Public
  2. All

Abstract Value Members

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

    Prepend the messages of a given segment in front of this input.

    Prepend the messages of a given segment in front of this input.

    prefix

    The segment to prepend.

    returns

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

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

    Prepend a message on this input.

    Prepend a message on this input.

    x

    the message to prepend.

    returns

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

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

    Builds a new input by applying a partial function to all messages of this input on which the function is defined.

    Builds a new input by applying a partial function to all messages of this input on which the function is defined.

    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.

  4. abstract def compress[B](f: (Seg[A]) ⇒ B)(implicit arg0: Message[B]): SInput[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.

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

    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.

    returns

    The same input excepted each message will be printed.

  6. abstract def dropWhile(p: (A) ⇒ Boolean): SInput[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

  7. abstract def extract(t: UThreadContext, k: (A) ⇒ Unit, h: (Signal) ⇒ Unit): Unit

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

    Attributes
    protected[io]
  9. abstract def filter(p: (A) ⇒ Boolean): SInput[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.

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

    Builds a new input by applying a function to all messages of this input and concatenating the results.

    Builds a new input by applying a function to all messages of this input and concatenating the results.

    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.

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

    Converts this input stream of traversable collections into an input stream in which all message collections are concatenated.

    Converts this input stream of traversable collections into an input stream in which all message collections are concatenated.

    B

    the type of the messages of each traversable collection.

    message

    an implicit message definition for the message type of the Traversable.

    asTraversable

    an implicit conversion which asserts that the message type of this input is a Traversable.

    returns

    a new input resulting from concatenating all the Traversable collections.

  12. abstract def fold[B](z: B)(f: (B, A) ⇒ B)(implicit arg0: Message[B]): IO[B]

    Fold left

  13. abstract 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

  14. abstract def grouped(size: Int): SInput[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

  15. abstract def map[B](f: (A) ⇒ B)(implicit arg0: Message[B]): SInput[B]

    Builds a new input by applying a function to all messages of this input.

    Builds a new input by applying a function to all messages of this input.

    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.

  16. abstract def parse[C >: A, B](parser: Parser[C, B])(implicit arg0: Message[C], arg1: Message[B]): SInput[B]

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

    Produces an input resulting from applying 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

  17. abstract def poison(): IO[Unit]

    Poison this input with EOS signal

  18. abstract def poison(signal: Signal): IO[Unit]

    Poison this input

    Poison this input

    signal

    the poisoning signal

  19. abstract def scan[B](z: B)(op: (B, A) ⇒ B)(implicit arg0: Message[B]): SInput[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

  20. 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
  21. abstract def smap[S, B](z: S)(fsm: (S, A) ⇒ (S, B))(implicit arg0: Message[B]): SInput[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

  22. 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.

  23. 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.

  24. abstract def test(thread: UThread): Promise[WInput[A]]

    Test the input stream (see stream.

    Test the input stream (see stream.TestableStream).

    Attributes
    protected[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] Prepend the messages of a given segment in front of this input.

    [use case]

    Prepend the messages of a given segment in front of this input.

    prefix

    The segment to prepend.

    returns

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

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

    [use case] Prepend a message on this input.

    [use case]

    Prepend a message on this input.

    x

    the message to prepend.

    returns

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

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

    [use case] Prepend a message on this input.

    [use case]

    Prepend a message on this input.

    x

    the message to prepend.

    returns

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

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

    Prepend a message on this input.

    Prepend a message on this input.

    x

    the message to prepend.

    returns

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

  8. 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
  9. 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
  10. 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
  11. 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
  12. final def ==(arg0: AnyRef): Boolean

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

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

    Definition Classes
    Any
  15. def clone(): AnyRef

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

    [use case] Builds a new input by applying a partial function to all messages of this input on which the function is defined.

    [use case]

    Builds a new input by applying a partial function to all messages of this input on which the function is defined.

    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.

  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[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  20. abstract def flatMap[B](f: (A) ⇒ Seg[B]): SInput[B]

    [use case] Builds a new input by applying a function to all messages of this input and concatenating the results.

    [use case]

    Builds a new input by applying a function to all messages of this input and concatenating the results.

    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.

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

    [use case] Converts this input stream of traversable collections into an input stream in which all message collections are concatenated.

    [use case]

    Converts this input stream of traversable collections into an input stream in which all message collections are concatenated.

    B

    the type of the messages of each traversable collection.

    returns

    a new input resulting from concatenating all the Traversable collections.

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

    [use case] Applies a function f to all elements of this input.

    [use case]

    Applies a function f to all elements of this input.

    f

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

    Definition Classes
    WInput
  23. def foreach[U](f: (A) ⇒ IO[U]): IO[Unit]

    Applies a function f to all elements of this input.

    Applies a function f to all elements of this input.

    U

    the type parameter describing the result of function f. This result will always be ignored. Typically U is Unit, but this is not necessary.

    f

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

    Definition Classes
    WInput
  24. final def getClass(): java.lang.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): SInput[B]

    [use case] Builds a new input by applying a function to all messages of this input.

    [use case]

    Builds a new input by applying a function to all messages of this input.

    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.

  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

    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

    Annotations
    @deprecated
    Deprecated

    (Since version 3.0) Use poison instead

Inherited from WInput[A]

Inherited from AnyRef

Inherited from Any