public class NotInsideContainerException
extends java.lang.IllegalStateException
GameObject
without a
container or the wrong container was invoked when a GameObject requires a
container.Constructor and Description |
---|
NotInsideContainerException(GameObject<?,?,?> item)
Create a NotInsideContainerException.
|
NotInsideContainerException(GameObjectContainer<?,?,?> container,
GameObject<?,?,?> item)
Create a NotInsideContainerException.
|
Modifier and Type | Method and Description |
---|---|
GameObjectContainer<?,?,?> |
getContainer()
Returns the Container that the GameObject was expected in.
|
BaseObject<?,?,?,?> |
getItem()
Returns the GameObject that was not inside a container but should have
been.
|
public NotInsideContainerException(@NotNull GameObject<?,?,?> item)
item
- GameObject that was not inside a container but should have
been.public NotInsideContainerException(@Nullable GameObjectContainer<?,?,?> container, @NotNull GameObject<?,?,?> item)
container
- Container that was queried or null
if a
container was expected but not found.item
- GameObject that was not inside a container but should have
been.@NotNull public BaseObject<?,?,?,?> getItem()
@Nullable public GameObjectContainer<?,?,?> getContainer()
null
if
it was expected to have any container but had not