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 Detail

      • isValid

        static boolean isValid​(IsShape shape)
        Returns true if shape passed as argument is not null and its methods are not returning null as well.
        Parameters:
        shape - shape to be checked
        Returns:
        true if shape passed as argument is not null and its methods are not returning null as well.
      • checkIfValid

        static void checkIfValid​(IsShape shape)
        Checks if shape passed as argument is not null and its methods are not returning null as well.
        If not, throw a IllegalArgumentException.
        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