Enum SquareType

  • All Implemented Interfaces:
    Serializable, Comparable<SquareType>

    public enum SquareType
    extends Enum<SquareType>
    SquareType represents the type of a square on the board. Square are grass or star when there represent arrival.
    Since:
    0.1.0
    Version:
    1.0.0
    Author:
    Andrew SASSOYE
    • Enum Constant Detail

      • GRASS

        public static final SquareType GRASS
        GRASS SQUARE TYPE
      • STAR

        public static final SquareType STAR
        STAR SQUARE TYPE
    • Method Detail

      • values

        public static SquareType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (SquareType c : SquareType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static SquareType valueOf​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null