|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mvc.ConstantModel<T>
public class ConstantModel<T>
A ConstantModel is a NamedModel whose value is fixed when it is constructed.
Constructor Summary | |
---|---|
ConstantModel(java.lang.String nm,
T val)
new ConstantModel(nm, val) returns a new ConstantModel with name nm and constant value val. |
Method Summary | |
---|---|
void |
addCallback(Callback cbk)
m.addCallback(cbk) registers cbk as an callback of m. |
java.lang.String |
getName()
m.getName() returns the name for m. |
T |
getValue()
m.getValue() returns the current value of m. |
void |
removeCallback(Callback cbk)
m.removeCallback(cbk) unregisters cbk as an callback of m. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConstantModel(java.lang.String nm, T val)
Method Detail |
---|
public java.lang.String getName()
getName
in interface Named
public T getValue()
getValue
in interface Model<T>
public void addCallback(Callback cbk)
addCallback
in interface CallbackRegistry
cbk
- the callback to be addedpublic void removeCallback(Callback cbk)
removeCallback
in interface CallbackRegistry
cbk
- the callback to be removed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |