Enum Class CardinalEdge

java.lang.Object
java.lang.Enum<CardinalEdge>
megamek.client.bot.princess.CardinalEdge
All Implemented Interfaces:
Serializable, Comparable<CardinalEdge>, Constable

public enum CardinalEdge extends Enum<CardinalEdge>
Since:
8/17/13 10:37 PM
  • Enum Constant Details

  • Method Details

    • values

      public static CardinalEdge[] 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 CardinalEdge 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
    • getIndex

      public int getIndex()
    • toString

      public String toString()
      Overrides:
      toString in class Enum<CardinalEdge>
    • getCardinalEdge

      public static CardinalEdge getCardinalEdge(int index)
      Given an index, attempt to return a cardinal edge.
    • parseFromString

      public static CardinalEdge parseFromString(String source)
      Given a string, attempt to figure out if it corresponds to a cardinal edge
    • getCardinalEdge

      public static CardinalEdge getCardinalEdge(OffBoardDirection direction)
      Convert an OffBoardDirection to a cardinal edge
    • getOppositeEdge

      public static CardinalEdge getOppositeEdge(CardinalEdge edge)
      Attempt to determine the opposite edge, given another cardinal edge