Class IngredientPositionsIndexEmpty<T,M>
java.lang.Object
org.cyclops.integrateddynamics.core.network.IngredientPositionsIndexEmpty<T,M>
- Type Parameters:
T
- An instance type.M
- The matching condition parameter.
- All Implemented Interfaces:
Iterable<T>
,org.cyclops.cyclopscore.ingredient.collection.IIngredientCollection<T,
,M> org.cyclops.cyclopscore.ingredient.collection.IIngredientCollectionLike<T,
,M, T> IIngredientPositionsIndex<T,
M>
public class IngredientPositionsIndexEmpty<T,M>
extends Object
implements IIngredientPositionsIndex<T,M>
An empty ingredients positions index.
-
Constructor Summary
ConstructorDescriptionIngredientPositionsIndexEmpty
(org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<T, M> component) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPosition
(T instance, PrioritizedPartPos pos) Indicate that the given position contains the given position.boolean
boolean
int
getPositions
(T instance, M matchFlags) Get all positions that have an instance that contain the given instance.long
getQuantity
(T instance) Get the available quantity for the given instance.iterator()
void
removePosition
(T instance, PrioritizedPartPos pos) Indicate that the given instance is removed from the given position.int
size()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.cyclops.cyclopscore.ingredient.collection.IIngredientCollection
containsAll, containsAll, parallelStream, spliterator, stream, toArray
Methods inherited from interface org.cyclops.cyclopscore.ingredient.collection.IIngredientCollectionLike
equals, hashCode, isEmpty, toString
-
Constructor Details
-
IngredientPositionsIndexEmpty
-
-
Method Details
-
getNonEmptyPositions
- Specified by:
getNonEmptyPositions
in interfaceIIngredientPositionsIndex<T,
M> - Returns:
- Get all positions that are not empty.
-
getPositions
Description copied from interface:IIngredientPositionsIndex
Get all positions that have an instance that contain the given instance.- Specified by:
getPositions
in interfaceIIngredientPositionsIndex<T,
M> - Parameters:
instance
- An instance to match.matchFlags
- Instance match conditions.- Returns:
- The positions.
-
addPosition
Description copied from interface:IIngredientPositionsIndex
Indicate that the given position contains the given position.- Specified by:
addPosition
in interfaceIIngredientPositionsIndex<T,
M> - Parameters:
instance
- An instance.pos
- A position.
-
removePosition
Description copied from interface:IIngredientPositionsIndex
Indicate that the given instance is removed from the given position. This will not necessarily remove the given position, only if the total instance quantity becomes zero.- Specified by:
removePosition
in interfaceIIngredientPositionsIndex<T,
M> - Parameters:
instance
- An instance.pos
- A position.
-
getQuantity
Description copied from interface:IIngredientPositionsIndex
Get the available quantity for the given instance.- Specified by:
getQuantity
in interfaceIIngredientPositionsIndex<T,
M> - Parameters:
instance
- An instance to match.- Returns:
- The indexed quantity.
-
contains
-
contains
-
count
-
getComponent
-
size
public int size() -
iterator
-
iterator
-