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
ModifierConstructorDescriptionprotected
IngredientMapWrappedAdapter
(IngredientComponent<T, M> component, C collection) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clears this map of all instances.boolean
containsValue
(V value) Check if this map contains the given value.Get the value for the given instance.protected C
iterator()
keySet()
Add a new entry.Remove the mapping for the given key instance.int
size()
values()
protected IngredientInstanceWrapper<T,
M> Methods inherited from class org.cyclops.cyclopscore.ingredient.collection.IngredientMapAdapter
entrySet, equals, getAll, getComponent, hashCode, iterator, keySet, removeAll, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.cyclops.cyclopscore.ingredient.collection.IIngredientCollectionLike
isEmpty
Methods inherited from interface org.cyclops.cyclopscore.ingredient.collection.IIngredientMap
containsKey, containsKey, containsKeyAll, containsKeyAll, countKey
Methods inherited from interface org.cyclops.cyclopscore.ingredient.collection.IIngredientMapMutable
putAll, removeAll, removeAll
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
IngredientMapWrappedAdapter
-
-
Method Details
-
getCollection
-
wrap
-
clear
public void clear()Description copied from interface:IIngredientMapMutable
Clears this map of all instances. -
put
Description copied from interface:IIngredientMapMutable
Add 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:IIngredientMapMutable
Remove 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:IIngredientMap
Check if this map contains the given value.- Parameters:
value
- A value.- Returns:
- If this map contains the given value.
-
get
Description copied from interface:IIngredientMap
Get the value for the given instance.- Parameters:
key
- An instance.- Returns:
- The value.
-
keySet
- Returns:
- All key instances.
-
values
- Returns:
- All values.
-
iterator
-