public enum ChildNodeDirection extends Enum<ChildNodeDirection>
For every tree there is a natural For example, if we root the tree at a Hybridization we will load children in the forward-loading direction down to experiment and in the revers-loading direction up to biosource and array design. For each node that is added to a tree we need to keep track if we should continue up or down the natural order. Otherwise we will end up in an infinite loop.
In a tree there can also be side-nodes that in most cases are end-point or leaf nodes. This is for example nodes containing information about protocol, software, annotations, etc. We call such nodes property nodes and they are usually loaded in both the forward- and reverse-loading directions.
Node.getChildNodeDirection()
Type | Property and Description |
---|---|
boolean |
load |
Enum Constant and Description |
---|
ALL |
FORWARD
Child nodes should be loaded in the forward-loading direction.
|
NONE
Represents an end-point node.
|
PROPERTY
Only property child nodes should be loaded.
|
REVERSE
Child nodes should be loaded in the reverse-loading direction.
|
Modifier and Type | Field and Description |
---|---|
private boolean |
loadForward |
private boolean |
loadProperty |
private boolean |
loadReverse |
Modifier and Type | Method and Description |
---|---|
boolean |
loadForward() |
boolean |
loadProperty() |
boolean |
loadReverse() |
static ChildNodeDirection |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ChildNodeDirection[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ChildNodeDirection NONE
public static final ChildNodeDirection PROPERTY
public static final ChildNodeDirection FORWARD
public static final ChildNodeDirection REVERSE
public static final ChildNodeDirection ALL
private final boolean loadForward
private final boolean loadReverse
private final boolean loadProperty
public static ChildNodeDirection[] values()
for (ChildNodeDirection c : ChildNodeDirection.values()) System.out.println(c);
public static ChildNodeDirection 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 boolean loadReverse()
public boolean loadForward()
public boolean loadProperty()