io.guise.framework.model.ModelGroup Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of guise-framework Show documentation
Show all versions of guise-framework Show documentation
Guise™ Internet application framework.
/*
* Copyright © 2005-2008 GlobalMentor, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.guise.framework.model;
/**
* A group of similar models for providing such functions as communication or mutual exclusion.
* @param The type of model contained in the group.
* @author Garret Wilson.
*/
public interface ModelGroup {
/**
* Determines whether this group contains the given model.
* @param model The model being checked for group inclusion.
* @return true
if the model is contained in this group, else false
.
* @throws NullPointerException if the given model is null
.
*/
public boolean contains(final Model model);
/**
* Adds a model to the group. If the model is already included in the group, no action occurs.
* @param model The model to add to the group.
* @throws NullPointerException if the given model is null
.
*/
public void add(final M model);
/**
* Removes a model from the group. If the model is not included in this group, no action occurs.
* @param model The model to remove from the group.
* @throws NullPointerException if the given model is null
.
*/
public void remove(final M model);
}