Class/Object

pl.metastack.metarx

Opt

Related Docs: object Opt | package metarx

Permalink

sealed class Opt[T] extends PartialChannel[T] with metarx.reactive.poll.PartialChannel with metarx.reactive.mutate.PartialChannel[T]

Publishes a stream of defined values. Use isEmpty() to detect when the current value is cleared.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Opt
  2. PartialChannel
  3. PartialChannel
  4. PartialChannel
  5. ReadPartialChannel
  6. PartialChannel
  7. Count
  8. Empty
  9. StateChannel
  10. ReadStateChannel
  11. Channel
  12. WriteChannel
  13. Produce
  14. ReadChannel
  15. Disposable
  16. Flush
  17. Size
  18. Cache
  19. MapExtended
  20. Map
  21. Filter
  22. Aggregate
  23. Is
  24. Fold
  25. Take
  26. Tail
  27. Head
  28. AnyRef
  29. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Opt(v: Option[T] = None)

    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 :=(value: Option[T]): Unit

    Permalink
    Definition Classes
    Produce
  4. def <<[U](ch: ReadChannel[Option[T]], ignore: ReadChannel[U]): ReadChannel[Unit]

    Permalink
    Definition Classes
    WriteChannel
  5. def <<(ch: ReadChannel[Option[T]]): ReadChannel[Unit]

    Permalink
    Definition Classes
    WriteChannel
  6. def <<>>(other: Channel[Option[T]], ignoreOther: ReadChannel[Unit]): Unit

    Permalink
    Definition Classes
    Channel
  7. def <<>>(other: Channel[Option[T]]): Unit

    Permalink
    Definition Classes
    Channel
  8. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def >>(ch: WriteChannel[Option[T]]): ReadChannel[Unit]

    Permalink
    Definition Classes
    ReadChannel
  10. def all(value: Option[T]): ReadChannel[Boolean]

    Permalink

    All elements are equal to value

    All elements are equal to value

    Definition Classes
    Filter
    See also

    any

  11. def any(value: Option[T]): ReadChannel[Boolean]

    Permalink

    At least one element is equal to value

    At least one element is equal to value

    Definition Classes
    Filter
    See also

    all

  12. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  13. def attach(f: (Option[T]) ⇒ Unit): ReadChannel[Unit]

    Permalink
    Definition Classes
    ReadChannel
  14. def biMap[U](f: (Option[T]) ⇒ U, g: (U) ⇒ Option[T]): Channel[U]

    Permalink
    Definition Classes
    Channel
  15. def bind(other: Channel[Option[T]], ignoreOther: ReadChannel[Unit]): Unit

    Permalink
    Definition Classes
    Channel
  16. def bind(other: Channel[Option[T]]): Unit

    Permalink

    Two-way binding; synchronises this and other.

    Two-way binding; synchronises this and other.

    Definition Classes
    Channel
  17. def buffer: Buffer[Option[T]]

    Permalink

    Buffers all produced elements

    Buffers all produced elements

    Definition Classes
    ReadChannel
  18. def cache(default: Option[T]): ReadStateChannel[Option[T]]

    Permalink
    Definition Classes
    ReadChannelCache
  19. def cache: ReadPartialChannel[Option[T]]

    Permalink
    Definition Classes
    ReadChannelCache
  20. def child(): ReadChannel[Option[T]]

    Permalink
    Definition Classes
    ReadChannel
  21. def clear(): Unit

    Permalink

    Clear current value (if exists)

    Clear current value (if exists)

    Definition Classes
    OptPartialChannel
  22. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. def collect[U](f: PartialFunction[Option[T], U]): ReadChannel[U]

    Permalink

    Applies partial function f on each element; if the function is not defined for the current input, it is filtered out

    Applies partial function f on each element; if the function is not defined for the current input, it is filtered out

    Definition Classes
    ReadChannelMapExtended
  24. def contains(value: T): ReadChannel[Boolean]

    Permalink
    Definition Classes
    ReadPartialChannel
  25. def contains$(value: T): Boolean

    Permalink
    Definition Classes
    OptCount
  26. def count(value: Option[T]): ReadChannel[Int]

    Permalink

    Count number of occurrence of value.

    Count number of occurrence of value.

    Definition Classes
    Filter
    Note

    Channels: With every matching element, the counter is increased.

    ,

    Buffers: When the element is removed, the counter is decreased.

  27. def detach(ch: ChildChannel[Option[T], _]): Unit

    Permalink
    Definition Classes
    ReadChannel
  28. def dispose(): Unit

    Permalink
    Definition Classes
    StateChannelChannelDisposable
  29. def distinct: ReadChannel[Option[T]]

    Permalink

    Filters out (merges) duplicates

    Filters out (merges) duplicates

    Definition Classes
    ReadChannelAggregate
  30. def drop(count: Int): ReadChannel[Option[T]]

    Permalink

    Definition Classes
    ReadChannelTake
    Note

    Channels: Skips first count elements, then stop listening. Subscribing to it will always yield the last result as initial value.

    ,

    Buffers: Creates a sub-buffer without the first count elements.

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  33. def exists(f: (Option[T]) ⇒ Boolean): ReadChannel[Boolean]

    Permalink

    Checks for existence of a value for which f is true

    Checks for existence of a value for which f is true

    Definition Classes
    Filter
    Note

    Channels: false as long as f returns false, then true

    ,

    Buffers: false as long as no row exists where f is true, then true

    See also

    forall

  34. def filter(f: (Option[T]) ⇒ Boolean): ReadChannel[Option[T]]

    Permalink

    Only include elements for which f is true

    Only include elements for which f is true

    Definition Classes
    ReadChannelFilter
  35. def filterCycles: ReadChannel[Option[T]]

    Permalink
    Definition Classes
    ReadChannel
  36. def filterNot(f: (Option[T]) ⇒ Boolean): ReadChannel[Option[T]]

    Permalink
    Definition Classes
    Filter
  37. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  38. def flatMap[U](f: (Option[T]) ⇒ ReadChannel[U]): ReadChannel[U]

    Permalink

    Applies f on each element and flatten its result into the stream

    Applies f on each element and flatten its result into the stream

    Definition Classes
    ReadChannelMapExtended
  39. def flatMapBuf[U](f: (Option[T]) ⇒ ReadBuffer[U]): ReadBuffer[U]

    Permalink
    Definition Classes
    ReadChannel
  40. def flatMapCh[U](f: (Option[T]) ⇒ Channel[U]): Channel[U]

    Permalink

    flatMap with back-propagation.

    flatMap with back-propagation.

    Definition Classes
    ReadChannel
  41. def flatMapSeq[U](f: (Option[T]) ⇒ Seq[U]): ReadChannel[U]

    Permalink

    Definition Classes
    ReadChannelMapExtended
    See also

    flatMap

  42. def flatProduce[U](value: Option[Option[T]], ignore: ReadChannel[U]*): Unit

    Permalink
    Definition Classes
    WriteChannel
  43. def flatProduce(value: Option[Option[T]]): Unit

    Permalink
    Definition Classes
    WriteChannel
  44. def flush(f: (Option[T]) ⇒ Unit): Unit

    Permalink

    Call f for each element

    Call f for each element

    Definition Classes
    OptWriteChannelReadChannelFlush
  45. def foldLeft[U](acc: U)(f: (U, Option[T]) ⇒ U): ReadChannel[U]

    Permalink

    Definition Classes
    ReadChannelFold
    Note

    Caches the accumulator value.

  46. def forall(f: (Option[T]) ⇒ Boolean): ReadChannel[Boolean]

    Permalink

    Checks whether f is true for all elements

    Checks whether f is true for all elements

    Definition Classes
    Filter
    See also

    exists

  47. def forkBi[U](fwd: Observer[Option[T], U], bwd: Observer[U, Option[T]], silent: Boolean = false): Channel[U]

    Permalink

    Bi-directional fork for values

    Bi-directional fork for values

    Definition Classes
    WriteChannel
  48. def forkBiFlat[U](obs: Observer[Option[T], Channel[U]]): Channel[U]

    Permalink

    Bi-directional fork for channels

    Bi-directional fork for channels

    Definition Classes
    ReadChannel
  49. def forkUni[U](observer: Observer[Option[T], U], filterCycles: Boolean = false): ReadChannel[U]

    Permalink

    Uni-directional fork for values

    Uni-directional fork for values

    Definition Classes
    ReadChannel
  50. def forkUniFlat[U](observer: Observer[Option[T], ReadChannel[U]]): ReadChannel[U]

    Permalink

    Uni-directional fork for channels

    Uni-directional fork for channels

    Definition Classes
    ReadChannel
  51. def forkUniState[U](observer: Observer[Option[T], U], onFlush: ⇒ Option[U]): ReadChannel[U]

    Permalink
    Definition Classes
    ReadChannel
  52. def get: Option[T]

    Permalink
    Definition Classes
    OptReadStateChannel
  53. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  54. def has(value: Option[T]): ReadChannel[Boolean]

    Permalink

    Stream contains at least one occurrence of value.

    Stream contains at least one occurrence of value.

    Definition Classes
    Filter
    Note

    Channels: Once true, will never produce any other value.

    ,

    Buffers: When the item is removed, it will produce false.

  55. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  56. def head: ReadChannel[Option[T]]

    Permalink

    Wraps first element as a channel

    Wraps first element as a channel

    Denotes first produced element after the head call; whether head has observers at this point is irrelevant as the value is cached (i.e. attaching repeatedly will always lead the same value)

    Definition Classes
    ReadChannelHead
  57. def is(value: Option[T]): ReadChannel[Boolean]

    Permalink

    Current value is equal to value

    Current value is equal to value

    Definition Classes
    ReadChannelIs
  58. def isDefined: ReadChannel[Boolean]

    Permalink

    true if partial channel has a value, false otherwise

    true if partial channel has a value, false otherwise

    Definition Classes
    OptPartialChannel
  59. def isDefined$: Boolean

    Permalink

    Value is defined

    Value is defined

    Definition Classes
    OptPartialChannel
  60. def isEmpty: ReadChannel[Boolean]

    Permalink

    Definition Classes
    Size
    Note

    Partial channels: Produce true if the current value is cleared.

    ,

    Channels: Produce false with the first received value.

    ,

    Buffers: Produce a new value once a row is added or removed.

  61. def isEmpty$: Boolean

    Permalink
    Definition Classes
    OptEmpty
  62. def isHead(value: Option[T]): ReadChannel[Boolean]

    Permalink

    Checks whether the given element is the first produced value

    Checks whether the given element is the first produced value

    Definition Classes
    ReadChannelHead
  63. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  64. def isNot(value: Option[T]): ReadChannel[Boolean]

    Permalink

    Current value is not equal to value

    Current value is not equal to value

    Definition Classes
    ReadChannelIs
  65. def map[U](f: (Option[T]) ⇒ U): ReadChannel[U]

    Permalink

    Applies f on each element

    Applies f on each element

    Definition Classes
    ReadChannelMap
  66. def mapOrElse[U](f: (T) ⇒ U, default: U): ReadChannel[U]

    Permalink
    Definition Classes
    ReadPartialChannel
  67. def mapTo[U](f: (Option[T]) ⇒ U): DeltaDict[Option[T], U]

    Permalink

    Map f on each element and turn stream into a dictionary

    Map f on each element and turn stream into a dictionary

    Definition Classes
    ReadChannelMapExtended
  68. def max[U >: Option[T]](init: U)(implicit num: Numeric[U]): ReadChannel[U]

    Permalink

    Calculates maximum value

    Calculates maximum value

    Definition Classes
    Fold
    See also

    foldLeft

  69. def merge(ch: ReadChannel[Option[T]]): ReadChannel[Option[T]]

    Permalink
    Definition Classes
    ReadChannel
  70. def min[U >: Option[T]](init: U)(implicit num: Numeric[U]): ReadChannel[U]

    Permalink

    Calculates minimum value

    Calculates minimum value

    Definition Classes
    Fold
    See also

    foldLeft

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

    Permalink
    Definition Classes
    AnyRef
  72. def nonEmpty: ReadChannel[Boolean]

    Permalink

    Negation of isEmpty

    Negation of isEmpty

    Definition Classes
    Size
  73. def nonEmpty$: Boolean

    Permalink
    Definition Classes
    OptEmpty
  74. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  75. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  76. def or(ch: ReadChannel[_]): ReadChannel[Unit]

    Permalink
    Definition Classes
    ReadChannel
  77. def orElse(default: ⇒ ReadChannel[T]): ReadChannel[T]

    Permalink
    Definition Classes
    ReadPartialChannel
  78. def partialBiMap[U](f: (Option[T]) ⇒ Option[U], g: (U) ⇒ Option[Option[T]]): Channel[U]

    Permalink
    Definition Classes
    Channel
  79. def partialUpdate(f: PartialFunction[T, T]): Unit

    Permalink
    Definition Classes
    OptPartialChannel
  80. def partition(f: (Option[T]) ⇒ Boolean): (ReadChannel[Option[T]], ReadChannel[Option[T]])

    Permalink

    Partitions stream into two sub-stream

    Partitions stream into two sub-stream

    The left stream contains all elements for which f is true, all other elements go to the right stream.

    Definition Classes
    Filter
  81. def produce[U](value: Option[T], ignore: ReadChannel[U]*): Unit

    Permalink
    Definition Classes
    WriteChannel
  82. def produce(value: Option[T]): Unit

    Permalink
    Definition Classes
    WriteChannelProduce
  83. def product[U >: Option[T]](implicit num: Numeric[U]): ReadChannel[U]

    Permalink

    Calculates product

    Calculates product

    Definition Classes
    Fold
    See also

    foldLeft

  84. def publish[U](ch: WriteChannel[Option[T]], ignore: ReadChannel[U]): ReadChannel[Unit]

    Permalink
    Definition Classes
    ReadChannel
  85. def publish(ch: WriteChannel[Option[T]]): ReadChannel[Unit]

    Permalink
    Definition Classes
    ReadChannel
  86. def silentAttach(f: (Option[T]) ⇒ Unit): ReadChannel[Unit]

    Permalink
    Definition Classes
    ReadChannel
  87. def size: ReadChannel[Int]

    Permalink

    Definition Classes
    ReadPartialChannelSize
    Note

    State channels: Produce when a new child is attached and if the size changes. In Opt the size is reset if the value is cleared.

    ,

    Channels: The size is only produced in response to each received value on the channel.

    ,

    Buffers: Produce the row count once a row is added or removed.

  88. def subscribe[U](ch: ReadChannel[Option[T]], ignore: ReadChannel[U]): ReadChannel[Unit]

    Permalink
    Definition Classes
    WriteChannel
  89. def subscribe(ch: ReadChannel[Option[T]]): ReadChannel[Unit]

    Permalink

    Redirect stream from other to this.

    Redirect stream from other to this.

    Definition Classes
    WriteChannel
  90. def sum[U >: Option[T]](implicit num: Numeric[U]): ReadChannel[U]

    Permalink

    Sums over all elements

    Sums over all elements

    Definition Classes
    Fold
    See also

    foldLeft

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

    Permalink
    Definition Classes
    AnyRef
  92. def tail: ReadChannel[Option[T]]

    Permalink

    Skips first element

    Skips first element

    Definition Classes
    ReadChannelTail
  93. def take(count: Int): ReadChannel[Option[T]]

    Permalink

    Definition Classes
    ReadChannelTake
    Note

    Channels: Takes first count elements, then stop listening. Subscribing to it will always yield the last result as initial value.

    ,

    Buffers: Will always contain the first count (or less) elements of the parent buffer.

  94. def takeUntil(ch: ReadChannel[_]): ReadChannel[Option[T]]

    Permalink

    Take all elements until ch produces any value

    Take all elements until ch produces any value

    Definition Classes
    ReadChannelTake
  95. def toBuffer: Buffer[Option[T]]

    Permalink

    Buffers only current element

    Buffers only current element

    Definition Classes
    ReadChannel
  96. def toOpt: Opt[Option[T]]

    Permalink
    Definition Classes
    Channel
  97. def toString(): String

    Permalink
    Definition Classes
    OptChannel → AnyRef → Any
  98. def undefined: ReadChannel[Boolean]

    Permalink
  99. def undefined$: Boolean

    Permalink

    Value is undefined

    Value is undefined

    Definition Classes
    OptPartialChannel
  100. def update(f: (Option[T]) ⇒ Option[T]): Unit

    Permalink
    Definition Classes
    StateChannel
  101. def values: ReadChannel[T]

    Permalink

    Filters out all defined values

    Filters out all defined values

    Definition Classes
    ReadPartialChannelPartialChannel
  102. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  105. def writeTo(write: WriteChannel[Option[T]]): Channel[Option[T]]

    Permalink
    Definition Classes
    ReadChannel
  106. def zip[U](other: ReadChannel[U]): ReadChannel[(Option[T], U)]

    Permalink
    Definition Classes
    ReadChannel
  107. def |(ch: ReadChannel[_]): ReadChannel[Unit]

    Permalink
    Definition Classes
    ReadChannel

Inherited from reactive.mutate.PartialChannel[T]

Inherited from PartialChannel[T]

Inherited from ReadPartialChannel[T]

Inherited from reactive.stream.PartialChannel[T]

Inherited from Count[T]

Inherited from Empty

Inherited from StateChannel[Option[T]]

Inherited from ReadStateChannel[Option[T]]

Inherited from Channel[Option[T]]

Inherited from WriteChannel[Option[T]]

Inherited from Produce[Option[T]]

Inherited from ReadChannel[Option[T]]

Inherited from Disposable

Inherited from Flush[Option[T]]

Inherited from Size

Inherited from Cache[Option[T]]

Inherited from MapExtended[ReadChannel, Option[T]]

Inherited from Map[ReadChannel, Option[T]]

Inherited from Filter[ReadChannel, Option[T], Option[T]]

Inherited from Aggregate[ReadChannel, Option[T]]

Inherited from Is[Option[T]]

Inherited from Fold[Option[T]]

Inherited from Take[ReadChannel, Option[T]]

Inherited from Tail[ReadChannel, Option[T]]

Inherited from Head[Option[T]]

Inherited from AnyRef

Inherited from Any

Ungrouped