org.gicentre.utils.spatial

## Enum Direction

- java.lang.Object
- - java.lang.Enum<Direction>
  - - org.gicentre.utils.spatial.Direction

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Direction>

      public enum Direction
      extends java.lang.Enum<Direction>

  Enumerated list of direction constants. Useful for specifying rook's-case and queen's-case neighbour relations.
  Version:
    3.4, 5th February, 2016.
  Author:
    Jo Wood, giCentre, City University London.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `CENTRE` Identifies a central position.
    `EAST` Identifies a easterly direction.
    `NORTH` Identifies a northerly direction.
    `NORTH_EAST` Identifies a north-easterly direction.
    `NORTH_WEST` Identifies a north-westerly direction.
    `SOUTH` Identifies a southerly direction.
    `SOUTH_EAST` Identifies a south easterly direction.
    `SOUTH_WEST` Identifies a south-westerly direction.
    `WEST` Identifies a westerly direction.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `toString()` Provides a textual representation of the list of direction options.
    `static Direction` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
    `static Direction[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### NORTH

          public static final Direction NORTH

      Identifies a northerly direction.

    - #### NORTH_EAST

          public static final Direction NORTH_EAST

      Identifies a north-easterly direction.

    - #### EAST

          public static final Direction EAST

      Identifies a easterly direction.

    - #### SOUTH_EAST

          public static final Direction SOUTH_EAST

      Identifies a south easterly direction.

    - #### SOUTH

          public static final Direction SOUTH

      Identifies a southerly direction.

    - #### SOUTH_WEST

          public static final Direction SOUTH_WEST

      Identifies a south-westerly direction.

    - #### WEST

          public static final Direction WEST

      Identifies a westerly direction.

    - #### NORTH_WEST

          public static final Direction NORTH_WEST

      Identifies a north-westerly direction.

    - #### CENTRE

          public static final Direction CENTRE

      Identifies a central position.

  - ### Method Detail

    - #### values

          public static Direction[] 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 (Direction c : Direction.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static Direction 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

    - #### toString

          public java.lang.String toString()

      Provides a textual representation of the list of direction options.
      Overrides:
        `toString` in class `java.lang.Enum<Direction>`
      Returns:
        Text representing the direction type.