public class TreePath
extends java.util.ArrayList<java.lang.String>
Tree. The path is expressed as a list of strings.| Constructor and Description |
|---|
TreePath()
Create an empty tree path.
|
TreePath(java.util.List<java.lang.String> initialPathEntries)
Create a tree path from a list.
|
TreePath(java.lang.String initialPathEntry,
java.lang.String... args)
Create a tre path.
|
TreePath(TreePath initialPath,
java.lang.String... args)
Create a tre path.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isEmptyPath(TreePath path)
Determines if a path is empty.
|
TreePath |
lastButOne()
Retrieves the a sub-section of this path from the first element to the second to last element.
|
TreePath |
subPath(int start,
int end)
Retrieves a subsection of the path.
|
java.lang.String |
toString() |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizepublic TreePath()
public TreePath(java.util.List<java.lang.String> initialPathEntries)
initialPathEntries - Entries in the path.public TreePath(java.lang.String initialPathEntry,
java.lang.String... args)
initialPathEntry - The first entry in the path.args - Additional path entries.public TreePath(TreePath initialPath, java.lang.String... args)
initialPath - Base tree path.args - Additional path elements to append to initialPath.public static boolean isEmptyPath(TreePath path)
path - Path to test.true if path contains no entries, path is null, or if the first entry of
path is null or an empty string.public TreePath lastButOne()
public TreePath subPath(int start, int end)
start - first index (inclusive) of the sub-pathend - last index (exclusive) of the sub-pathstart and end.public java.lang.String toString()
toString in class java.util.AbstractCollection<java.lang.String>