public enum TransitionType extends Enum<TransitionType>
Enum Constant and Description |
---|
CENTER
Center.
|
CORNER_DOWN_LEFT
Down left.
|
CORNER_DOWN_RIGHT
Down right.
|
CORNER_UP_LEFT
Up left.
|
CORNER_UP_RIGHT
Up right.
|
DOWN
Down.
|
DOWN_LEFT
Down left.
|
DOWN_RIGHT
Down right.
|
LEFT
Left.
|
RIGHT
Right.
|
UP
Up.
|
UP_LEFT
UP left.
|
UP_LEFT_DOWN_RIGHT
Up left and down right.
|
UP_RIGHT
Up right.
|
UP_RIGHT_DOWN_LEFT
Up right and down left.
|
Modifier and Type | Field and Description |
---|---|
static int |
BITS
Total bits number.
|
Modifier and Type | Method and Description |
---|---|
static TransitionType |
from(boolean[] binary)
Get the transition representation from its bits sequence.
|
static TransitionType |
from(boolean downRight,
boolean downLeft,
boolean upRight,
boolean upLeft)
Get the transition representation from its bits sequence.
|
static TransitionType |
from(String name)
Convert transition name to its enum value.
|
boolean |
getDownLeft()
Get bit at down left.
|
boolean |
getDownRight()
Get bit at down right.
|
TransitionType |
getSymetric()
Get the symmetric transition.
|
boolean |
getUpLeft()
Get bit at up left.
|
boolean |
getUpRight()
Get bit at up right.
|
boolean |
is(boolean downRight,
boolean downLeft,
boolean upRight,
boolean upLeft)
Check if the sequence of bit has the same representation of this transition.
|
static TransitionType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TransitionType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TransitionType CENTER
public static final TransitionType UP_LEFT
public static final TransitionType UP_RIGHT
public static final TransitionType UP
public static final TransitionType DOWN
public static final TransitionType DOWN_LEFT
public static final TransitionType DOWN_RIGHT
public static final TransitionType LEFT
public static final TransitionType RIGHT
public static final TransitionType UP_LEFT_DOWN_RIGHT
public static final TransitionType UP_RIGHT_DOWN_LEFT
public static final TransitionType CORNER_UP_LEFT
public static final TransitionType CORNER_UP_RIGHT
public static final TransitionType CORNER_DOWN_LEFT
public static final TransitionType CORNER_DOWN_RIGHT
public static final int BITS
public static TransitionType[] values()
for (TransitionType c : TransitionType.values()) System.out.println(c);
public static TransitionType 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 static TransitionType from(String name)
name
- The transition name.LionEngineException
- If invalid name.public static TransitionType from(boolean downRight, boolean downLeft, boolean upRight, boolean upLeft)
downRight
- The down right flag.downLeft
- The down left flag.upRight
- The up right flag.upLeft
- The up left flag.public static TransitionType from(boolean[] binary)
binary
- The binary array (length must be equal to BITS
).LionEngineException
- If invalid array size.public TransitionType getSymetric()
public boolean is(boolean downRight, boolean downLeft, boolean upRight, boolean upLeft)
downRight
- The down right flag.downLeft
- The down left flag.upRight
- The up right flag.upLeft
- The up left flag.true
if equals, false
else.public boolean getUpLeft()
public boolean getUpRight()
public boolean getDownLeft()
public boolean getDownRight()
Copyright © 2017 Byron 3D Games Studio. All rights reserved.