Interface HierarchicalIdentifier<T extends HierarchicalIdentifier<T>>
-
- All Superinterfaces:
Identifier
,Immutable
,MutationBehaviour<Immutable>
,Path<T>
,Serializable
- All Known Implementing Classes:
YangInstanceIdentifier
public interface HierarchicalIdentifier<T extends HierarchicalIdentifier<T>> extends Identifier, Path<T>
AnIdentifier
tied to some tree-like structure, similar to howPath
is tied to a conceptual file system. In addition to equivalence class implied by Identifier, the hierarchical nature of these identifiers also introduces a notion of containment: a HierarchicalIdentifier is said to contain another HierarchicalIdentifier if the former points to an ancestor node of the node pointed to by the latter in the same instance of the tree-like structure they are defined on. This property is expressed throughcontains(HierarchicalIdentifier)
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
contains(T other)
Check if this identifier contains some other identifier.-
Methods inherited from interface org.opendaylight.yangtools.concepts.Identifier
equals, hashCode, toString
-
-
-
-
Method Detail
-
contains
boolean contains(T other)
Check if this identifier contains some other identifier. If we take HierarchicalIdentifier to be similar to aPath
, this is method is the equivalent ofother.startsWith(this)
.- Specified by:
contains
in interfacePath<T extends HierarchicalIdentifier<T>>
- Parameters:
other
- Other identifier, may not be null- Returns:
- True if this identifier contains the other identifier
- Throws:
NullPointerException
- ifother
is null
-
-