Class IngredientMapWrappedAdapter<T, M, V, C extends Map<IngredientInstanceWrapper<T,M>, V>>
java.lang.Object
org.cyclops.cyclopscore.ingredient.collection.IngredientMapAdapter<T,M,V>
org.cyclops.cyclopscore.ingredient.collection.IngredientMapWrappedAdapter<T,M,V,C>
- Type Parameters:
T- The instance type.M- The matching condition parameter.V- The type of mapped values.
- All Implemented Interfaces:
Iterable<Map.Entry<T,V>>, IIngredientCollectionLike<T, M, Map.Entry<T, V>>, IIngredientMap<T, M, V>, IIngredientMapMutable<T, M, V>
- Direct Known Subclasses:
IngredientHashMap, IngredientTreeMap
public abstract class IngredientMapWrappedAdapter<T, M, V, C extends Map<IngredientInstanceWrapper<T,M>, V>>
extends IngredientMapAdapter<T,M,V>
An abstract ingredient map adapter.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedIngredientMapWrappedAdapter(IngredientComponent<T, M> component, C collection) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears this map of all instances.booleancontainsValue(V value) Check if this map contains the given value.Get the value for the given instance.protected Citerator()keySet()Add a new entry.Remove the mapping for the given key instance.intsize()values()protected IngredientInstanceWrapper<T, M> Methods inherited from class IngredientMapAdapter
entrySet, equals, getAll, getComponent, hashCode, iterator, keySet, removeAll, toStringMethods inherited from interface IIngredientCollectionLike
isEmptyMethods inherited from interface IIngredientMap
containsKey, containsKey, containsKeyAll, containsKeyAll, countKeyMethods inherited from interface IIngredientMapMutable
putAll, removeAll, removeAllMethods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
IngredientMapWrappedAdapter
-
-
Method Details
-
getCollection
-
wrap
-
clear
public void clear()Description copied from interface:IIngredientMapMutableClears this map of all instances. -
put
Description copied from interface:IIngredientMapMutableAdd a new entry.- Parameters:
key- An instance key.value- A value.- Returns:
- The previous value that was associated with the given instance.
-
remove
Description copied from interface:IIngredientMapMutableRemove the mapping for the given key instance.- Parameters:
key- An instance key.- Returns:
- The value that was associated with the given instance.
-
size
public int size()- Returns:
- The number of instances contained in this collection.
-
containsValue
Description copied from interface:IIngredientMapCheck if this map contains the given value.- Parameters:
value- A value.- Returns:
- If this map contains the given value.
-
get
Description copied from interface:IIngredientMapGet the value for the given instance.- Parameters:
key- An instance.- Returns:
- The value.
-
keySet
- Returns:
- All key instances.
-
values
- Returns:
- All values.
-
iterator
-