object Dep
Dep is very much like a Val
, but is also a Channel
. The basic purpose is to represent a value dependent upon
another variable. An example of this might be if you are representing a position left
and you also wanted to
represent right
as well (which would be left
+ width
). These two variables are dependent upon each other and
don't fit well as Var
s. An example usage might be:
val left: Var[Double] = Var(0.0)
val width: Var[Double] = Var(0.0)
val right: Dep[Double, Double] = Dep(left, width)
If an instance is submissive
it removes adjustment
from being part of the mutation dependency. For example: in
the above scenario if you set width
to 100.0 and right
to 125.0 then left
will be 25.0. Now, what should happen
if you change width
to 50.0? Should left
change to 75.0 (submissive = false
) or should right
change to 75.0
(submissive = true
)?
- Alphabetic
- By Inheritance
- Dep
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply[T, V](variable: Var[V], adjustment: ⇒ T, submissive: Boolean = false)(implicit connector: DepConnector[T, V]): Dep[T, V]
Creates a new
Dep
instance for the referenced channel.Creates a new
Dep
instance for the referenced channel.- variable
the variable depended on
- adjustment
the adjustment to derive the value of the dependency from the variable
- submissive
whether this Dep should submit to the variable.
- returns
dependency instance
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )