Serializable, Comparable<MooreNeighbourhood>, Neighbourhood<MooreNeighbourhood>, org.refcodes.graphical.Position, org.refcodes.graphical.PosXAccessor, org.refcodes.graphical.PosYAccessorpublic enum MooreNeighbourhood extends Enum<MooreNeighbourhood> implements Neighbourhood<MooreNeighbourhood>
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| Enum Constant | Description |
|---|---|
BOTTOM |
|
BOTTOM_LEFT |
|
BOTTOM_RIGHT |
|
LEFT |
|
RIGHT |
|
TOP |
|
TOP_LEFT |
|
TOP_RIGHT |
| Modifier and Type | Method | Description |
|---|---|---|
MooreNeighbourhood |
clockwiseNext() |
Returns the next clockwise state relative to the current state.
|
MooreNeighbourhood |
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 MooreNeighbourhood |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static MooreNeighbourhood[] |
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 MooreNeighbourhood LEFT
public static final MooreNeighbourhood TOP_LEFT
public static final MooreNeighbourhood TOP
public static final MooreNeighbourhood TOP_RIGHT
public static final MooreNeighbourhood RIGHT
public static final MooreNeighbourhood BOTTOM_RIGHT
public static final MooreNeighbourhood BOTTOM
public static final MooreNeighbourhood BOTTOM_LEFT
public static MooreNeighbourhood[] values()
for (MooreNeighbourhood c : MooreNeighbourhood.values()) System.out.println(c);
public static MooreNeighbourhood 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 MooreNeighbourhood clockwiseNext()
TOP would be
TOP_RIGHT, next to TOP_RIGHT would be RIGHT,
and so on (clockwise).clockwiseNext in interface Neighbourhood<MooreNeighbourhood>public MooreNeighbourhood clockwisePrevious()
TOP
would be TOP_LEFT, next to TOP_LEFT would be
LEFT, and so on (anti-clockwise).clockwisePrevious in interface Neighbourhood<MooreNeighbourhood>Copyright © 2018. All rights reserved.