JPuzzle.Utilities
Enum Posicion.Direccion
java.lang.Object
java.lang.Enum<Posicion.Direccion>
JPuzzle.Utilities.Posicion.Direccion
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<Posicion.Direccion>
- Enclosing class:
- Posicion
protected static enum Posicion.Direccion
- extends java.lang.Enum<Posicion.Direccion>
Enumeración de las posibles direcciones que sirven para transformar una
posición, permite generar una dirección aleatoria. El orden es importante
para la velocidad en la búsqueda de los movimientos.
Methods inherited from class java.lang.Enum |
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
ARRIBA
public static final Posicion.Direccion ARRIBA
ABAJO
public static final Posicion.Direccion ABAJO
IZQUIERDA
public static final Posicion.Direccion IZQUIERDA
DERECHA
public static final Posicion.Direccion DERECHA
values
public static Posicion.Direccion[] 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 (Posicion.Direccion c : Posicion.Direccion.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static Posicion.Direccion 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
random
public static Posicion.Direccion random()
- Genera una dirección aleatoria.
- Returns:
- una dirección aleatoria