Package aQute.lib.hierarchy
Class Hierarchy.Node
java.lang.Object
aQute.lib.hierarchy.Hierarchy.Node
- All Implemented Interfaces:
NamedNode,Comparable<NamedNode>
- Direct Known Subclasses:
Hierarchy.Folder,Hierarchy.Leaf,Hierarchy.OrphanNode
- Enclosing class:
- Hierarchy
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final String(package private) final Optional<Hierarchy.Folder> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintFind a path from this node down.(package private) Hierarchy.Node(package private) abstract voidgetPath(StringBuilder app) name()The name of this node.Optional<? extends Hierarchy.Folder>parent()Return the parent of this node.path()The path of this node in the hierarchy.root()Answer the root node
-
Field Details
-
parent
-
name
-
-
Constructor Details
-
Node
Node(Optional<Hierarchy.Folder> parent, String name)
-
-
Method Details
-
name
Description copied from interface:NamedNodeThe name of this node. This name is always without a '/'. -
path
Description copied from interface:NamedNodeThe path of this node in the hierarchy. This path never starts with a '/'. If it is a folder, the path must end with a '/'.This path, when used with
Hierarchy.find(String)must return the this node. -
compareTo
- Specified by:
compareToin interfaceComparable<NamedNode>
-
getPath
-
parent
Description copied from interface:NamedNodeReturn the parent of this node. Only the root will return an emptyOptional. Each hierarchy has a single root. -
root
Description copied from interface:NamedNodeAnswer the root node -
find
Description copied from interface:NamedNodeFind a path from this node down. The `..` and '.' are supported, meaning parent and this. -
find
-