public static final class Tree.Path extends Object implements Serializable
Tree.childAtPath(Path)
,
Serialized FormModifier and Type | Method and Description |
---|---|
Tree.Path |
append(Tree.Path path)
Appends the given
path to this one. |
boolean |
equals(Object obj) |
int |
get(int index)
Return the child index at the given index (child level).
|
int |
hashCode() |
int |
length()
Return the path length, which is the level of the child
this
path points to. |
static Tree.Path |
of(int... path)
Create a new path object from the given child indexes.
|
int[] |
toArray()
Return the path as
int[] array. |
String |
toString() |
public int length()
this
path points to.public int get(int index)
index
- the path indexIndexOutOfBoundsException
- if the index is not with the range
[0, length())
public int[] toArray()
int[]
array.int[]
arraypublic Tree.Path append(Tree.Path path)
path
to this
one.path
- the path to appendPath
with the given path
appendedNullPointerException
- if the given path
is null
public static Tree.Path of(int... path)
path
- the child indexesIllegalArgumentException
- if one of the path elements is
smaller than zero© 2007-2019 Franz Wilhelmstötter (2019-11-18 20:30)