Serializable, Comparable<VonNeumannNeighbourhood>, Neighbourhood<VonNeumannNeighbourhood>, org.refcodes.graphical.Position, org.refcodes.graphical.PosXAccessor, org.refcodes.graphical.PosYAccessorpublic enum VonNeumannNeighbourhood extends Enum<VonNeumannNeighbourhood> implements Neighbourhood<VonNeumannNeighbourhood>
org.refcodes.graphical.Position.PositionBuilder<B extends org.refcodes.graphical.Position.PositionBuilder<B>>, org.refcodes.graphical.Position.PositionMutator, org.refcodes.graphical.Position.PositionProperty, org.refcodes.graphical.Position.PositionPropertyBuilder| Modifier and Type | Method | Description |
|---|---|---|
VonNeumannNeighbourhood |
clockwiseNext() |
Returns the next clockwise state relative to the current state.
|
VonNeumannNeighbourhood |
clockwisePrevious() |
Returns the next anti-clockwise state relative to the current state.
|
int |
getPositionX() |
Returns the relative X position to position (0, 0).
|
int |
getPositionY() |
Returns the relative Y position to position (0, 0).
|
static VonNeumannNeighbourhood |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static VonNeumannNeighbourhood[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfnextpublic static final VonNeumannNeighbourhood LEFT
public static final VonNeumannNeighbourhood TOP
public static final VonNeumannNeighbourhood RIGHT
public static final VonNeumannNeighbourhood BOTTOM
public static VonNeumannNeighbourhood[] values()
for (VonNeumannNeighbourhood c : VonNeumannNeighbourhood.values()) System.out.println(c);
public static VonNeumannNeighbourhood valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic int getPositionX()
getPositionX in interface org.refcodes.graphical.PosXAccessorpublic int getPositionY()
getPositionY in interface org.refcodes.graphical.PosYAccessorpublic VonNeumannNeighbourhood clockwiseNext()
TOP would be
RIGHT, next to RIGHT would be BOTTOM, and so
on (clockwise).clockwiseNext in interface Neighbourhood<VonNeumannNeighbourhood>public VonNeumannNeighbourhood clockwisePrevious()
TOP
would be LEFT, next to LEFT would be BOTTOM,
and so on (anti-clockwise).clockwisePrevious in interface Neighbourhood<VonNeumannNeighbourhood>Copyright © 2018. All rights reserved.