org.refcodes.collection.Container Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of refcodes-collection Show documentation
Show all versions of refcodes-collection Show documentation
Artifact with collection definitions and collections.
// /////////////////////////////////////////////////////////////////////////////
// REFCODES.ORG
// =============================================================================
// This code is copyright (c) by Siegfried Steiner, Munich, Germany and licensed
// under the following (see "http://en.wikipedia.org/wiki/Multi-licensing")
// licenses:
// =============================================================================
// GNU General Public License, v3.0 ("http://www.gnu.org/licenses/gpl-3.0.html")
// together with the GPL linking exception applied; as being applied by the GNU
// Classpath ("http://www.gnu.org/software/classpath/license.html")
// =============================================================================
// Apache License, v2.0 ("http://www.apache.org/licenses/LICENSE-2.0")
// =============================================================================
// Please contact the copyright holding author(s) of the software artifacts in
// question for licensing issues not being covered by the above listed licenses,
// also regarding commercial licensing models or regarding the compatibility
// with other open source licenses.
// /////////////////////////////////////////////////////////////////////////////
package org.refcodes.collection;
import java.util.Iterator;
/**
* Basic functionality being provided by any {@link Container} (collection)
* style class.
*
* @param The type of the elements being stored in the
* {@link MutableContainer}.
*/
public interface Container extends Elements, Containable {
/**
* Extends the {@link Container} interface with {@link Clearable}
* functionality (as of {@link #clear()}). The case of having a plain
* {@link Container} without dedicated {@link MutableElements#add(Object)}
* or {@link MutableElements#remove(Object)} methods but with a dedicated
* {@link #clear()} method seems to be quite common, therefore this
* interface has been provided.
*
* @param The type of the elements being stored in the
* {@link ClearableContainer}.
*/
public interface ClearableContainer extends Container, ClearableElements {}
/**
* Extends the {@link Container} with mutable (writable) functionality,
* especially by enabling the {@link Iterator#remove()} method in the
* {@link Iterator} provided via {@link #iterator()}.
*
* @param The type of the elements being stored in the
* {@link MutableContainer}.
*/
public interface MutableContainer extends ClearableContainer, MutableElements {}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy