Enum TileType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<TileType>, java.lang.constant.Constable

    public enum TileType
    extends java.lang.Enum<TileType>
    Author:
    Martha Cartwright
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.lang.Enum

        java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int TILE_SIZE  
    • Method Summary

      Modifier and Type Method Description
      int getId()  
      static TileType getTileTypeByID​(int id)  
      boolean isCollidable()  
      static TileType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static TileType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • NONCOLLIDABLE

        public static final TileType NONCOLLIDABLE
      • COLLIDABLE

        public static final TileType COLLIDABLE
    • Method Detail

      • values

        public static TileType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared.
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TileType valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getId

        public int getId()
      • isCollidable

        public boolean isCollidable()
      • getTileTypeByID

        public static TileType getTileTypeByID​(int id)
        Parameters:
        id - ID of TileType
        Returns:
        TileType