Class InconsistentIngredientInsertionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.cyclops.cyclopscore.ingredient.storage.InconsistentIngredientInsertionException
- All Implemented Interfaces:
Serializable
An exception that can be thrown when ingredients are being moved,
and some ingredient could not be inserted into a destination storage,
even though the simulation declared that this insertion would be allowed.
This is typically thrown when the remainder ingredient has nowhere else
to go, and should be handled exceptionally to avoid it going lost.
- See Also:
-
Constructor Summary
ConstructorDescriptionInconsistentIngredientInsertionException
(IngredientComponent<?, ?> ingredientComponent, IIngredientComponentStorage<?, ?> destination, Object remainder, Object movedActual) -
Method Summary
Modifier and TypeMethodDescription<T,
M> IIngredientComponentStorage <T, M> <T,
M> IngredientComponent <T, M> <T> T
<T> T
toString()
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
InconsistentIngredientInsertionException
public InconsistentIngredientInsertionException(IngredientComponent<?, ?> ingredientComponent, IIngredientComponentStorage<?, ?> destination, Object remainder, Object movedActual)
-
-
Method Details
-
getIngredientComponent
-
getDestination
-
getRemainder
public <T> T getRemainder()- Type Parameters:
T
- The instance type.- Returns:
- The instance that could not be re-inserted and would be lost.
-
getMovedActual
public <T> T getMovedActual()- Type Parameters:
T
- The instance type.- Returns:
- The instance that was successfully moved.
-
toString
-