Package microsim.space.turtle
Enum AbstractTurtle.Direction
- java.lang.Object
-
- java.lang.Enum<AbstractTurtle.Direction>
-
- microsim.space.turtle.AbstractTurtle.Direction
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<AbstractTurtle.Direction>
- Enclosing class:
- AbstractTurtle
public static enum AbstractTurtle.Direction extends java.lang.Enum<AbstractTurtle.Direction>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getNumVal()
AbstractTurtle.Direction
leftShift(int steps)
AbstractTurtle.Direction
rightShift(int steps)
static AbstractTurtle.Direction
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static AbstractTurtle.Direction[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
North
public static final AbstractTurtle.Direction North
-
NorthEast
public static final AbstractTurtle.Direction NorthEast
-
East
public static final AbstractTurtle.Direction East
-
SouthEast
public static final AbstractTurtle.Direction SouthEast
-
South
public static final AbstractTurtle.Direction South
-
SouthWest
public static final AbstractTurtle.Direction SouthWest
-
West
public static final AbstractTurtle.Direction West
-
NorthWest
public static final AbstractTurtle.Direction NorthWest
-
-
Method Detail
-
values
public static AbstractTurtle.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 (AbstractTurtle.Direction c : AbstractTurtle.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 AbstractTurtle.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 namejava.lang.NullPointerException
- if the argument is null
-
getNumVal
public int getNumVal()
-
leftShift
public AbstractTurtle.Direction leftShift(int steps)
-
rightShift
public AbstractTurtle.Direction rightShift(int steps)
-
-