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

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

The newest version!
package reactify.group

import reactify.Channel
import reactify.reaction.{GroupReactions, Reactions}

case class ChannelGroup[T](override val name: Option[String],
                           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(name, items ::: List(that))
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy