|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.guiseframework.model.AbstractModelGroup<M>
M - The type of model contained in the group.public abstract class AbstractModelGroup<M extends Model>
An abstract implementation of a group of similar models for providing such functions as communication or mutual exclusion. This class is thread safe.
| Constructor Summary | |
|---|---|
AbstractModelGroup(M... models)
Model constructor. |
|
| Method Summary | |
|---|---|
void |
add(M model)
Adds a model to the group. |
protected void |
addImpl(M model)
Actual implementation of adding a model to the group. |
boolean |
contains(Model model)
Determines whether this group contains the given model. |
protected java.util.Set<M> |
getModelSet()
|
void |
remove(M model)
Removes a model from the group. |
protected void |
removeImpl(M model)
Actual implementation of removing a model from the group. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractModelGroup(M... models)
models - Zero or more models with which to initially place in the group.
java.lang.NullPointerException - if one of the models is null.| Method Detail |
|---|
protected java.util.Set<M> getModelSet()
public boolean contains(Model model)
contains in interface ModelGroup<M extends Model>model - The model being checked for group inclusion.
true if the model is contained in this group, else false.
java.lang.NullPointerException - if the given model is null.public void add(M model)
#addImpl(M).
add in interface ModelGroup<M extends Model>model - The model to add to the group.
java.lang.NullPointerException - if the given model is null.protected void addImpl(M model)
model - The model to add to the group.
java.lang.NullPointerException - if the given model is null.public void remove(M model)
#removeImpl(M).
remove in interface ModelGroup<M extends Model>model - The model to remove from the group.
java.lang.NullPointerException - if the given model is null.protected void removeImpl(M model)
model - The model to remove from the group.
java.lang.NullPointerException - if the given model is null.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||