Enum Class Entity.Direction

java.lang.Object
java.lang.Enum<Entity.Direction>
nz.ac.vuw.ecs.swen225.gp22.domain.Entity.Direction
All Implemented Interfaces:
Serializable, Comparable<Entity.Direction>, Constable
Enclosing class:
Entity<S extends Observable<S>>

public static enum Entity.Direction extends Enum<Entity.Direction>
Enum with values for each direction, which each have a point representing the change in position.
  • Enum Constant Details

    • Up

      public static final Entity.Direction Up
      Represents an upwards vector.
    • Down

      public static final Entity.Direction Down
      Represents an downwards vector.
    • Left

      public static final Entity.Direction Left
      Represents a vector going left.
  • Method Details

    • values

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

      public static Entity.Direction valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • opposite

      public abstract Entity.Direction opposite()
      Returns:
      The opposite direction.