Class IngredientCollectionCollectionAdapter<T, M, C extends Collection<T>>
java.lang.Object
org.cyclops.cyclopscore.ingredient.collection.IngredientCollectionAdapter<T,M>
org.cyclops.cyclopscore.ingredient.collection.IngredientCollectionCollectionAdapter<T,M,C>
- Type Parameters:
T- The instance type.M- The matching condition parameter.C- The type of inner collection.
- All Implemented Interfaces:
Iterable<T>, IIngredientCollection<T,M>, IIngredientCollectionLike<T, M, T>, IIngredientCollectionMutable<T, M>
- Direct Known Subclasses:
IngredientList
public abstract class IngredientCollectionCollectionAdapter<T, M, C extends Collection<T>>
extends IngredientCollectionAdapter<T,M>
implements IIngredientCollectionMutable<T,M>
An abstract collection that stores instances directly in a regular
Collection.-
Constructor Summary
ConstructorsConstructorDescriptionIngredientCollectionCollectionAdapter(IngredientComponent<T, M> component, C collection) -
Method Summary
Methods inherited from class IngredientCollectionAdapter
contains, contains, count, getComponent, hashCode, iterator, remove, removeAll, toStringMethods inherited from class Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface IIngredientCollection
contains, contains, containsAll, containsAll, count, iterator, parallelStream, spliterator, stream, toArrayMethods inherited from interface IIngredientCollectionLike
equals, getComponent, hashCode, isEmpty, toString
-
Constructor Details
-
IngredientCollectionCollectionAdapter
-
-
Method Details
-
getCollection
-
add
Description copied from interface:IIngredientCollectionMutableAdd the given instance to the collection.- Specified by:
addin interfaceIIngredientCollectionMutable<T,M> - Parameters:
instance- An instance.- Returns:
- If the collection was changed due to this addition. This can be false in the case of sets in which each instance can only exists once.
-
clear
public void clear()Description copied from interface:IIngredientCollectionMutableClears this collection of all instances.- Specified by:
clearin interfaceIIngredientCollectionMutable<T,M>
-
size
public int size()- Specified by:
sizein interfaceIIngredientCollectionLike<T, M, C extends Collection<T>>- Returns:
- The number of instances contained in this collection.
-
iterator
-