Package io.guise.framework.model
Class ValuePolicyModelGroup<V>
java.lang.Object
io.guise.framework.model.AbstractModelGroup<ValueModel<V>>
io.guise.framework.model.ValuePolicyModelGroup<V>
- Type Parameters:
V
- The type of value contained in the value model.
- All Implemented Interfaces:
com.globalmentor.beans.GenericPropertyChangeListener<V>
,ModelGroup<ValueModel<V>>
,PropertyChangeListener
,EventListener
- Direct Known Subclasses:
MutualExclusionPolicyModelGroup
public abstract class ValuePolicyModelGroup<V>
extends AbstractModelGroup<ValueModel<V>>
implements com.globalmentor.beans.GenericPropertyChangeListener<V>
An abstract implementation of a group of value models implementing a value policy across several models, such as mutual exclusion. When value models are
added to the list, the group adds itself as a property value change listeners to the model, listening for changes in the value.
- Author:
- Garret Wilson.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addImpl
(ValueModel<V> valueModel) Actual implementation of adding a model to the group.final void
propertyChange
(PropertyChangeEvent propertyChangeEvent) protected void
removeImpl
(ValueModel<V> valueModel) Actual implementation of removing a model from the group.Methods inherited from class io.guise.framework.model.AbstractModelGroup
add, contains, getModelSet, remove
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.globalmentor.beans.GenericPropertyChangeListener
propertyChange
-
Constructor Details
-
ValuePolicyModelGroup
Model constructor.- Parameters:
models
- Zero or more models with which to initially place in the group.- Throws:
NullPointerException
- if one of the models isnull
.
-
-
Method Details
-
addImpl
Actual implementation of adding a model to the group.This version adds this class instance as a listener to the model's value changing.
- Overrides:
addImpl
in classAbstractModelGroup<ValueModel<V>>
- Parameters:
valueModel
- The model to add to the group.
-
removeImpl
Actual implementation of removing a model from the group.This version removes this class instance as a listener to the model's value changing.
- Overrides:
removeImpl
in classAbstractModelGroup<ValueModel<V>>
- Parameters:
valueModel
- The model to remove from the group.
-
propertyChange
- Specified by:
propertyChange
in interfacePropertyChangeListener
-