Enum Class Direction

java.lang.Object
java.lang.Enum<Direction>
pi.graphics.geom.Direction
All Implemented Interfaces:
Serializable, Comparable<Direction>, Constable

@API public enum Direction extends Enum<Direction>
Repräsentation einer Richtung.
Author:
Michael Andonie, Niklas Keller
  • Nested Class Summary

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

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Repräsentation einer Richtung, die nach unten zeigt.
    Repräsentation einer Richtung, die nach unten links zeigt.
    Repräsentation einer Richtung, die nach oben rechts zeigt.
    Repräsentation einer Richtung, die nach links zeigt.
    Repräsentation einer Richtung, die nirgendwo hinzeigt.
    Repräsentation einer Richtung, die nach rechts zeigt.
    Repräsentation einer Richtung, die nach oben zeigt.
    Repräsentation einer Richtung, die nach oben links zeigt.
    Repräsentation einer Richtung, die nach oben rechts zeigt.
  • Method Summary

    Modifier and Type
    Method
    Description
    Berechnet einen einfachen Vektor (maximale Auslenkung bei jeder Achse 1 – positiv wie negativ).
    static Direction
    Returns the enum constant of this class with the specified name.
    static Direction[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

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

    • UP

      public static final Direction UP
      Repräsentation einer Richtung, die nach oben zeigt.
    • UP_RIGHT

      public static final Direction UP_RIGHT
      Repräsentation einer Richtung, die nach oben rechts zeigt.
    • DOWN_RIGHT

      public static final Direction DOWN_RIGHT
      Repräsentation einer Richtung, die nach oben rechts zeigt.
    • DOWN

      public static final Direction DOWN
      Repräsentation einer Richtung, die nach unten zeigt.
    • DOWN_LEFT

      public static final Direction DOWN_LEFT
      Repräsentation einer Richtung, die nach unten links zeigt.
    • LEFT

      public static final Direction LEFT
      Repräsentation einer Richtung, die nach links zeigt.
    • UP_LEFT

      public static final Direction UP_LEFT
      Repräsentation einer Richtung, die nach oben links zeigt.
    • NONE

      public static final Direction NONE
      Repräsentation einer Richtung, die nirgendwo hinzeigt.
  • Method Details

    • values

      public static 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 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
    • toVector

      @API public Vector toVector()
      Berechnet einen einfachen Vektor (maximale Auslenkung bei jeder Achse 1 – positiv wie negativ).
      Returns:
      Vector, der mit einer einfachen Auslenkung (d.h. für x und y je ein Wertebereich von {-1, 0, 1}) die entsprechende Bewegung macht.