Class IngredientCollectionDiffManager<T,M>
java.lang.Object
org.cyclops.cyclopscore.ingredient.collection.diff.IngredientCollectionDiffManager<T,M>
- Type Parameters:
T
- The instance type.M
- The matching condition parameter.
Observes an
IIngredientCollection
to calculate diffs
each time onChange(Iterator)
is called.-
Constructor Summary
ConstructorDescriptionIngredientCollectionDiffManager
(IngredientComponent<T, M> ingredientComponent) -
Method Summary
Modifier and TypeMethodDescriptionCalculates the diff between the given instances and the instances from the last call of this method.
-
Constructor Details
-
IngredientCollectionDiffManager
-
-
Method Details
-
onChange
Calculates the diff between the given instances and the instances from the last call of this method. When this method has not been called before, it will emit a diff with all instances as additions.- Parameters:
newInstances
- The new instances.- Returns:
- The diff.
-
getInstancesCache
-