Sharkysoft home

lava.mv
Class MvModelExtra

java.lang.Object
  |
  +--lava.mv.MvModel
        |
        +--lava.mv.MvModelExtra

public abstract class MvModelExtra
extends MvModel

Abstract base class for models with arbitrary property set.

Details: I am an MvModel that supports arbitrary properties. Many views of minimal models need to cache away information related to their particular renderings of the model. I provide a safe and easy mechanism for doing so. Views can extend the data elements represented by my model without polluting the model from the perspective of other views.

Since:
1998.06.08
See Also:
MvModel, IMvView

Constructor Summary
protected MvModelExtra()
          Same as superclass.
protected MvModelExtra(java.lang.Object id)
          Same as superclass.
 
Method Summary
 java.lang.Object getProperty(java.lang.Object key)
          Removes property.
 void setProperty(java.lang.Object key, java.lang.Object value)
          Adds property.
 
Methods inherited from class lava.mv.MvModel
getEventDispatcher, notifyViews, notifyViews, registerView, setEventDispatcher, unregisterView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MvModelExtra

protected MvModelExtra(java.lang.Object id)
Same as superclass.

Details: This constructor does the same thing as the superclass' constructor.

Parameters:
id - parameter passed to superconstructor

MvModelExtra

protected MvModelExtra()
Same as superclass.

Details: This constructor does the same thing as the superclass' constructor.

Method Detail

setProperty

public void setProperty(java.lang.Object key,
                        java.lang.Object value)
Adds property.

Details: setProperty adds the given (key, value) combination to properties.

Parameters:
key - the key
value - the value
Throws:
NullPointerException - if key is null

getProperty

public java.lang.Object getProperty(java.lang.Object key)
Removes property.

Details: getProperty retrieves the property associated with the given key.

Parameters:
key - the key
Returns:
the property
Throws:
NullPointerException - if key is null

Sharkysoft home