Package net.sf.gridarta.model.gameobject
Class NotInsideContainerException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- java.lang.IllegalStateException
-
- net.sf.gridarta.model.gameobject.NotInsideContainerException
-
- All Implemented Interfaces:
java.io.Serializable
public class NotInsideContainerException extends java.lang.IllegalStateExceptionThis exception is thrown in case a method of aGameObjectwithout a container or the wrong container was invoked when a GameObject requires a container.- See Also:
- Serialized Form
- No Inspection:
- UncheckedExceptionClass
-
-
Constructor Summary
Constructors Constructor Description NotInsideContainerException(@NotNull GameObject<?,?,?> item)Creates a new instance.NotInsideContainerException(@Nullable GameObjectContainer<?,?,?> container, @NotNull GameObject<?,?,?> item)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Constructor Detail
-
NotInsideContainerException
public NotInsideContainerException(@NotNull @NotNull GameObject<?,?,?> item)Creates a new instance.- Parameters:
item- GameObject that was not inside a container but should have been.
-
NotInsideContainerException
public NotInsideContainerException(@Nullable @Nullable GameObjectContainer<?,?,?> container, @NotNull @NotNull GameObject<?,?,?> item)Creates a new instance.- Parameters:
container- Container that was queried ornullif a container was expected but not found.item- GameObject that was not inside a container but should have been.
-
-
Method Detail
-
getItem
@NotNull public @NotNull BaseObject<?,?,?,?> getItem()
Returns the game object that was not inside a container but should have been.- Returns:
- the game object that was not inside a container but should have been
-
getContainer
@Nullable public @Nullable GameObjectContainer<?,?,?> getContainer()
Returns the container that the GameObject was expected in.- Returns:
- the container the game object was expected in or
nullif it was expected to have any container but had not
-
-