20 package net.sf.gridarta.model.gameobject;
24 import org.jetbrains.annotations.NotNull;
25 import org.jetbrains.annotations.Nullable;
74 super(container == null ? item +
" was expected to be inside a container but wasn't." : item +
" was expected to be inside " + container +
" but was in " + item.getContainer());
BaseObject<?, ?, ?, ?> getItem()
Returns the GameObject that was not inside a container but should have been.
Base class for classes that contain GameObjects as children in the sense of containment.
Base package of all Gridarta classes.
This exception is thrown in case a method of a GameObject without a container or the wrong container ...
NotInsideContainerException(@NotNull final GameObject<?, ?, ?> item)
Create a NotInsideContainerException.
static final long serialVersionUID
The serial version UID.
final GameObjectContainer<?, ?, ?> container
The expected container if != null or null if expected to be in any container.
final BaseObject<?, ?, ?, ?> item
The GameObject that was not inside a / the container but should have been.
GameObjectContainer<?, ?, ?> getContainer()
Returns the Container that the GameObject was expected in.
NotInsideContainerException(@Nullable final GameObjectContainer<?, ?, ?> container, @NotNull final GameObject<?, ?, ?> item)
Create a NotInsideContainerException.