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(@NotNull GameObject<?,?,?> item)
Creates a new instance.
|
NotInsideContainerException(@Nullable GameObjectContainer<?,?,?> container,
@NotNull GameObject<?,?,?> item)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
@Nullable GameObjectContainer<?,?,?> |
getContainer()
Returns the container that the GameObject was expected in.
|
@NotNull BaseObject<?,?,?,?> |
getItem()
Returns the game object that was not inside a container but should have
been.
|
public NotInsideContainerException(@NotNull @NotNull GameObject<?,?,?> item)
item
- GameObject that was not inside a container but should have
been.public NotInsideContainerException(@Nullable @Nullable GameObjectContainer<?,?,?> container, @NotNull @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 @NotNull BaseObject<?,?,?,?> getItem()
@Nullable public @Nullable GameObjectContainer<?,?,?> getContainer()
null
if
it was expected to have any container but had not