|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.scopemvc.model.basic.BasicModel
|
+--org.scopemvc.model.collection.SetModel
A BasicModel wrapper for an Set that can propagate changes to
contained Models up the Model hierarchy. The set itself is exposed via the
"set" property, however, changes to this underlying set must be made through
this class's public API in order to maintain the event propagation.
By default SetModel registers itself as a listener to Models that are added to the list and deregisters when those Models are removed. This behaviour can be changed at creation so that ModelChangeEvent propagation from contained models is disabled.
| Field Summary | |
protected java.util.Set |
contents
TODO: describe of the Field |
protected boolean |
propagateModelChanges
TODO: describe of the Field |
static Selector |
SET
TODO: describe of the Field |
protected static java.lang.String |
TO_STRING_SEPARATOR
TODO: describe of the Field |
protected static int |
TO_STRING_SEPARATOR_LENGTH
TODO: describe of the Field |
| Fields inherited from interface org.scopemvc.core.ModelChangeTypes |
ACCESS_CHANGED, VALUE_ADDED, VALUE_CHANGED, VALUE_REMOVED |
| Constructor Summary | |
SetModel()
Constructor for the SetModel object |
|
SetModel(boolean inPropagateModelChanges)
Constructor for the SetModel object |
|
SetModel(boolean inPropagateModelChanges,
java.util.Set inSet)
Constructor for the SetModel object |
|
SetModel(java.util.Set inSet)
Constructor for the SetModel object |
|
| Method Summary | |
boolean |
add(java.lang.Object o)
TODO: document the method |
boolean |
addAll(java.util.Collection c)
Adds an element to the All attribute of the SetModel object |
void |
clear()
TODO: document the method |
boolean |
contains(java.lang.Object arg0)
TODO: document the method |
boolean |
containsAll(java.util.Collection arg0)
TODO: document the method |
boolean |
equals(java.lang.Object o)
TODO: document the method |
java.util.Set |
getSet()
Gets the set |
int |
getSize()
Gets the size |
int |
hashCode()
TODO: document the method |
boolean |
isEmpty()
Gets the empty |
java.util.Iterator |
iterator()
TODO: document the method |
void |
modelChanged(ModelChangeEvent inEvent)
TODO: document the method |
boolean |
remove(java.lang.Object o)
TODO: document the method |
boolean |
removeAll(java.util.Collection c)
TODO: document the method |
boolean |
retainAll(java.util.Collection c)
TODO: document the method |
void |
setSet(java.util.Set inContents)
Set contents to the passed Object list and fire a ModelChangeEvent. |
int |
size()
TODO: document the method |
java.lang.Object[] |
toArray()
TODO: document the method |
java.lang.Object[] |
toArray(java.lang.Object[] arg0)
TODO: document the method |
java.lang.String |
toString()
TODO: document the method |
| Methods inherited from class org.scopemvc.model.basic.BasicModel |
addModelChangeListener, fireModelChange, listenNewSubmodel, makeActive, removeModelChangeListener, unlistenOldSubmodel |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final Selector SET
protected static final java.lang.String TO_STRING_SEPARATOR
protected static final int TO_STRING_SEPARATOR_LENGTH
protected java.util.Set contents
protected boolean propagateModelChanges
| Constructor Detail |
public SetModel()
public SetModel(java.util.Set inSet)
inSet - TODO: Describe the Parameterpublic SetModel(boolean inPropagateModelChanges)
inPropagateModelChanges - TODO: Describe the Parameter
public SetModel(boolean inPropagateModelChanges,
java.util.Set inSet)
inPropagateModelChanges - TODO: Describe the ParameterinSet - TODO: Describe the Parameter| Method Detail |
public java.util.Set getSet()
public int getSize()
public boolean isEmpty()
isEmpty in interface java.util.Setpublic void setSet(java.util.Set inContents)
inContents - The new set valuepublic void modelChanged(ModelChangeEvent inEvent)
modelChanged in interface ModelChangeEventSourcemodelChanged in class BasicModelinEvent - TODO: Describe the Parameterpublic java.lang.String toString()
toString in class java.lang.Objectpublic int size()
size in interface java.util.Setpublic boolean contains(java.lang.Object arg0)
contains in interface java.util.Setarg0 - TODO: Describe the Parameter
public java.util.Iterator iterator()
iterator in interface java.util.Setpublic java.lang.Object[] toArray()
toArray in interface java.util.Setpublic java.lang.Object[] toArray(java.lang.Object[] arg0)
toArray in interface java.util.Setarg0 - TODO: Describe the Parameter
public boolean containsAll(java.util.Collection arg0)
containsAll in interface java.util.Setarg0 - TODO: Describe the Parameter
public boolean add(java.lang.Object o)
add in interface java.util.Seto - TODO: Describe the Parameter
public boolean remove(java.lang.Object o)
remove in interface java.util.Seto - TODO: Describe the Parameter
public boolean addAll(java.util.Collection c)
addAll in interface java.util.Setc - The element to be added to the All attribute
public boolean retainAll(java.util.Collection c)
retainAll in interface java.util.Setc - TODO: Describe the Parameter
public boolean removeAll(java.util.Collection c)
removeAll in interface java.util.Setc - TODO: Describe the Parameter
public void clear()
clear in interface java.util.Setpublic boolean equals(java.lang.Object o)
equals in interface java.util.Setequals in class java.lang.Objecto - TODO: Describe the Parameter
public int hashCode()
hashCode in interface java.util.SethashCode in class java.lang.Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||