Class LeafRefPath
java.lang.Object
org.opendaylight.yangtools.yang.data.tree.leafref.LeafRefPath
- All Implemented Interfaces:
Immutable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LeafRefPath
Shared instance of the conceptual root schema node.static final LeafRefPath
Shared instance of the "same" relative schema node. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
LeafRefPath
(LeafRefPath parent, QNameWithPredicate qname) -
Method Summary
Modifier and TypeMethodDescriptionstatic LeafRefPath
create
(boolean absolute, QNameWithPredicate... path) Constructs new instance of this class with the concrete path.static LeafRefPath
create
(Iterable<QNameWithPredicate> path, boolean absolute) Constructs new instance of this class with the concrete path.createChild
(Iterable<QNameWithPredicate> relative) Create a child path based on concatenation of this path and a relative path.createChild
(LeafRefPath relative) Create a child path based on concatenation of this path and a relative path.createChild
(QNameWithPredicate... elements) Create a child path based on concatenation of this path and additional path elements.protected abstract LeafRefPath
createInstance
(LeafRefPath newParent, QNameWithPredicate newQname) Create a new instance.boolean
final QNameWithPredicate
Get the last component of this path.Returns the immediate parent LeafRefPath.Returns the list of nodes which need to be traversed to get from the starting point (root for absolute LeafRefPaths) to the node represented by this object.Returns the list of nodes which need to be traversed to get from this node to the starting point (root for absolute LeafRefPaths).final int
hashCode()
abstract boolean
Describes whether schema path is|isn't absolute.toString()
-
Field Details
-
ROOT
Shared instance of the conceptual root schema node. -
SAME
Shared instance of the "same" relative schema node.
-
-
Constructor Details
-
LeafRefPath
-
-
Method Details
-
create
Constructs new instance of this class with the concrete path.- Parameters:
path
- list of QNameWithPredicate instances which specifies exact path to the module nodeabsolute
- boolean value which specifies if the path is absolute or relative- Returns:
- A LeafRefPath instance.
-
create
Constructs new instance of this class with the concrete path.- Parameters:
absolute
- boolean value which specifies if the path is absolute or relativepath
- one or more QNameWithPredicate instances which specifies exact path to the module node- Returns:
- A LeafRefPath instance.
-
createInstance
Create a new instance.- Parameters:
newParent
- Parent LeafRefPathnewQname
- next path element- Returns:
- A new LeafRefPath instance
-
createChild
Create a child path based on concatenation of this path and a relative path.- Parameters:
relative
- Relative path- Returns:
- A new child path
-
createChild
Create a child path based on concatenation of this path and a relative path.- Parameters:
relative
- Relative LeafRefPath- Returns:
- A new child path
-
createChild
Create a child path based on concatenation of this path and additional path elements.- Parameters:
elements
- Relative LeafRefPath elements- Returns:
- A new child path
-
getPathFromRoot
Returns the list of nodes which need to be traversed to get from the starting point (root for absolute LeafRefPaths) to the node represented by this object.- Returns:
- list of
qname
instances which represents path from the root to the schema node.
-
getPathTowardsRoot
Returns the list of nodes which need to be traversed to get from this node to the starting point (root for absolute LeafRefPaths).- Returns:
- list of
qname
instances which represents path from the schema node towards the root.
-
getParent
Returns the immediate parent LeafRefPath.- Returns:
- Parent path, null if this LeafRefPath is already toplevel.
-
getLastComponent
Get the last component of this path.- Returns:
- The last component of this path.
-
isAbsolute
public abstract boolean isAbsolute()Describes whether schema path is|isn't absolute.- Returns:
- boolean value which is
true
if schema path is absolute.
-
hashCode
public final int hashCode() -
equals
-
toString
-