util
Enum GameMath.MapDir
java.lang.Object
java.lang.Enum<GameMath.MapDir>
util.GameMath.MapDir
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<GameMath.MapDir>
- Enclosing class:
- GameMath
public static enum GameMath.MapDir
- extends java.lang.Enum<GameMath.MapDir>
| 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 |
EAST
public static final GameMath.MapDir EAST
NORTH_EAST
public static final GameMath.MapDir NORTH_EAST
NORTH
public static final GameMath.MapDir NORTH
NORTH_WEST
public static final GameMath.MapDir NORTH_WEST
WEST
public static final GameMath.MapDir WEST
SOUTH_WEST
public static final GameMath.MapDir SOUTH_WEST
SOUTH
public static final GameMath.MapDir SOUTH
SOUTH_EAST
public static final GameMath.MapDir SOUTH_EAST
octant
public final int octant
degrees
public final int degrees
values
public static GameMath.MapDir[] 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 (GameMath.MapDir c : GameMath.MapDir.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static GameMath.MapDir 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
getX
public int getX()
getY
public int getY()
rotate
public GameMath.MapDir rotate(GameMath.MapRotate rot)
add
public GameMath.MapDir add(GameMath.MapDir dir)
getDir
public static GameMath.MapDir getDir(int dx,
int dy)
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Enum<GameMath.MapDir>