Interface IsShape
-
- All Superinterfaces:
Key
- All Known Implementing Classes:
CharacterShape
,ImageShape
,Shape
public interface IsShape extends Key
Defines a shape to draw on the tile.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static void
checkIfValid(IsShape shape)
Checks if shape passed as argument is notnull
and its methods are not returningnull
as well.
If not, throw aIllegalArgumentException
.ShapeDrawer
getDrawer()
Returns the instance of shape drawer.String
getKeyPrefix()
Returns a unique key prefix for shape to use in the cache.static boolean
isValid(IsShape shape)
Returnstrue
if shape passed as argument is notnull
and its methods are not returningnull
as well.
-
-
-
Method Detail
-
isValid
static boolean isValid(IsShape shape)
Returnstrue
if shape passed as argument is notnull
and its methods are not returningnull
as well.- Parameters:
shape
- shape to be checked- Returns:
true
if shape passed as argument is notnull
and its methods are not returningnull
as well.
-
checkIfValid
static void checkIfValid(IsShape shape)
Checks if shape passed as argument is notnull
and its methods are not returningnull
as well.
If not, throw aIllegalArgumentException
.- Parameters:
shape
- shape to be checked
-
getDrawer
ShapeDrawer getDrawer()
Returns the instance of shape drawer.- Returns:
- the instance of shape drawer.
-
getKeyPrefix
String getKeyPrefix()
Returns a unique key prefix for shape to use in the cache.- Returns:
- a unique key prefix for shape to use in the cache
-
-