Package org.gnome.glib
Enum Class TraverseType
- All Implemented Interfaces:
Enumeration
,Serializable
,Comparable<TraverseType>
,Constable
@Generated("io.github.jwharm.JavaGI")
public enum TraverseType
extends Enum<TraverseType>
implements Enumeration
Specifies the type of traversal performed by g_tree_traverse(),
g_node_traverse() and g_node_find().
The different orders are illustrated here:
- In order: A, B, C, D, E, F, G, H, I
- Pre order: F, B, A, D, C, E, G, I, H
- Post order: A, C, E, D, B, H, I, G, F
- Level order: F, B, G, A, D, I, C, E, H
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionvists a node's left child first, then the node itself, then its right child.is not implemented for [balanced binary trees][glib-Balanced-Binary-Trees].visits the node's children, then the node itself.visits a node, then its children. -
Method Summary
Modifier and TypeMethodDescriptionint
getValue()
Get the numeric value of this enumstatic TraverseType
of
(int value) Create a new TraverseType for the provided valuestatic TraverseType
Returns the enum constant of this class with the specified name.static TraverseType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
IN_ORDER
vists a node's left child first, then the node itself, then its right child. This is the one to use if you want the output sorted according to the compare function. -
PRE_ORDER
visits a node, then its children. -
POST_ORDER
visits the node's children, then the node itself. -
LEVEL_ORDER
is not implemented for [balanced binary trees][glib-Balanced-Binary-Trees]. For [n-ary trees][glib-N-ary-Trees], it vists the root node first, then its children, then its grandchildren, and so on. Note that this is less efficient than the other orders.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
of
Create a new TraverseType for the provided value- Parameters:
value
- the enum value- Returns:
- the enum for the provided value
-
getValue
public int getValue()Get the numeric value of this enum- Specified by:
getValue
in interfaceEnumeration
- Returns:
- the enum value
-