|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<Corner>
util.Corner
public enum Corner
Representation of the four corners in a rectangular figure.
| Enum Constant Summary | |
|---|---|
LOWER_LEFT
|
|
LOWER_RIGHT
|
|
UPPER_LEFT
|
|
UPPER_RIGHT
|
|
| Method Summary | |
|---|---|
Corner |
clockwise()
Returns the next clockwise rotation. |
Corner |
counterClockwise()
Returns the next counter-clockwise rotation. |
static Corner |
fromString(String str)
Returns the enum representation of a string. |
Point |
getOffset(Point loc)
Returns a point offset in this direction according to inverted cartesian coordinates (the same as Graphics objects). |
boolean |
isLeft()
Returns if the corner is left or right. |
boolean |
isUpper()
Returns if the corner is upper or lower. |
static Corner |
random()
Returns a random corner. |
Corner |
reverse()
Returns the opposite facing direction. |
String |
toString()
|
static Corner |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static Corner[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final Corner UPPER_LEFT
public static final Corner UPPER_RIGHT
public static final Corner LOWER_RIGHT
public static final Corner LOWER_LEFT
| Method Detail |
|---|
public static Corner[] values()
for (Corner c : Corner.values()) System.out.println(c);
public static Corner valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is nullpublic static Corner fromString(String str)
str - toString representation of this enum
IllegalArgumentException - if argument is not represented by this enum.public static Corner random()
public Corner clockwise()
Orientation
clockwise in interface Orientationpublic Corner counterClockwise()
Orientation
counterClockwise in interface Orientationpublic Corner reverse()
Orientation
reverse in interface Orientationpublic Point getOffset(Point loc)
Orientation
getOffset in interface Orientationloc - location to be offset
public boolean isUpper()
public boolean isLeft()
public String toString()
toString in class Enum<Corner>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||