All Downloads are FREE. Search and download functionalities are using the official Maven repository.

reactify.group.ChannelGroup.scala Maven / Gradle / Ivy

package reactify.group

import reactify.Channel
import reactify.reaction.Reactions

case class ChannelGroup[T](items: List[Channel[T]]) extends Channel[T] with Group[T, Channel[T]] {
  override lazy val reactions: Reactions[T] = new GroupReactions(this)

  override def set(value: => T): Unit = items.foreach(_.set(value))

  override def and(that: Channel[T]): Channel[T] = ChannelGroup(items ::: List(that))
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy