Interface HierarchicalIdentifier<T extends HierarchicalIdentifier<T>>

All Superinterfaces:
Identifier, Immutable, Serializable
All Known Implementing Classes:
AbstractHierarchicalIdentifier, YangInstanceIdentifier

public interface HierarchicalIdentifier<T extends HierarchicalIdentifier<T>> extends Identifier
An Identifier tied to some tree-like structure, similar to how Path 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 through contains(HierarchicalIdentifier).
  • Method Summary

    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 Details

    • contains

      boolean contains(T other)
      Check if this identifier contains some other identifier. If we take HierarchicalIdentifier to be similar to a Path, this is method is the equivalent of other.startsWith(this).
      Parameters:
      other - Other identifier, may not be null
      Returns:
      True if this identifier contains the other identifier
      Throws:
      NullPointerException - if other is null