com.guiseframework.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
 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, else false.
Throws:
java.lang.NullPointerException - if the given model is null.

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 is null.

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 is null.


Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.