Package io.guise.framework.model
Interface ModelGroup<M extends Model>
-
- Type Parameters:
M
- The type of model contained in the group.
- All Known Implementing Classes:
AbstractModelGroup
,MutualExclusionPolicyModelGroup
,ValuePolicyModelGroup
public interface ModelGroup<M extends Model>
A group of similar models for providing such functions as communication or mutual exclusion.- Author:
- Garret Wilson.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
add(M model)
Adds a model to the group.boolean
contains(Model model)
Determines whether this group contains the given model.void
remove(M model)
Removes a model from the group.
-
-
-
Method Detail
-
contains
boolean contains(Model model)
Determines whether this group contains the given model.- Parameters:
model
- The model being checked for group inclusion.- Returns:
true
if the model is contained in this group, elsefalse
.- Throws:
java.lang.NullPointerException
- if the given model isnull
.
-
add
void add(M model)
Adds a model to the group. If the model is already included in the group, no action occurs.- Parameters:
model
- The model to add to the group.- Throws:
java.lang.NullPointerException
- if the given model isnull
.
-
remove
void remove(M model)
Removes a model from the group. If the model is not included in this group, no action occurs.- Parameters:
model
- The model to remove from the group.- Throws:
java.lang.NullPointerException
- if the given model isnull
.
-
-