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

reactify.bind.Binding.scala Maven / Gradle / Ivy

There is a newer version: 4.1.2
Show newest version
package reactify.bind

import reactify.Var
import reactify.reaction.Reaction

/**
  * Binding represents a two-way binding between two `Var`s
  */
class Binding[L, R](left: Var[L], right: Var[R], leftToRight: Reaction[L], rightToLeft: Reaction[R]) {
  /**
    * Detaches the binding
    */
  def detach(): Unit = {
    left.reactions -= leftToRight
    right.reactions -= rightToLeft
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy