|
JADE v6.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dautelle.physics.Quantity.Value
This inner class represents a mutable image of an imutable
Quantity
. Instances of this class are typically used
for inter-threads communication (e.g. system state).
Updates/queries do not perform heap allocation (when executed
in a pool context), but usually require synchronization.
Constructor Summary | |
Quantity.Value(Quantity initialValue)
Creates a mutable value for quantities of the same type than the initial value argument. |
Method Summary | |
Quantity |
get()
Returns an immutable copy of this mutable value (allocated on the "stack" when the current thread execute in a pool context). |
void |
set(Quantity value)
Sets the current value for this mutable. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Quantity.Value(Quantity initialValue)
initialValue
- the initial value, it also defines the type
of quantity being held by this value.Method Detail |
public Quantity get()
public void set(Quantity value)
value
- the new value.
java.lang.IllegalArgumentException
- if the system unit of the specified
quantity is different from the initial value system unit.Quantity.Value(com.dautelle.physics.Quantity)
|
JADE v6.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |