public static enum Tree.Order extends Enum<Tree.Order>
Example tree:
1
/ \
/ \
/ \
2 3
/ \ /
4 5 6
/ / \
7 8 9
See also
Enum Constant and Description |
---|
IN_ORDER
7 4 2 5 1 8 6 9 3
|
LEVEL_ORDER
1 2 3 4 5 6 7 8 9 (= breadth-first)
|
POST_ORDER
7 4 5 2 8 9 6 3 1
|
PRE_ORDER
1 2 4 7 5 3 6 8 9 (= depth-first)
|
Modifier and Type | Method and Description |
---|---|
static Tree.Order |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Tree.Order[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Tree.Order PRE_ORDER
public static final Tree.Order IN_ORDER
public static final Tree.Order POST_ORDER
public static final Tree.Order LEVEL_ORDER
public static Tree.Order[] values()
for (Tree.Order c : Tree.Order.values()) System.out.println(c);
public static Tree.Order 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 nullCopyright © 2016. All Rights Reserved.