- * Java representation of YANG Built-in type instance-identifier,
- * which conceptually is XPath expression minimized to uniquely identify element
- * in data tree which conforms to constraints maintained by YANG Model,
+ * Java representation of YANG Built-in type {@code instance-identifier}, which conceptually is XPath expression
+ * minimized to uniquely identify element in data tree which conforms to constraints maintained by YANG Model,
* effectively this makes Instance Identifier a path to element in data tree.
*
*
- * Constraints put in YANG specification on instance-identifier allowed it to be
- * effectively represented in Java and it's evaluation does not require
- * full-blown XPath processor.
+ * Constraints put in YANG specification on instance-identifier allowed it to be effectively represented in Java and its
+ * evaluation does not require a full-blown XPath processor.
*
- *
- *
Path Arguments
- * Path to the node represented in instance identifier consists of
- * {@link PathArgument} which carries necessary information to uniquely identify
- * node on particular level in the subtree.
+ *
Path Arguments
+ * Path to the node represented in instance identifier consists of {@link PathArgument} which carries necessary
+ * information to uniquely identify node on particular level in the subtree.
*
*
- *
{@link NodeIdentifier} - Identifier of node, which has cardinality
- * 0..1 in particular subtree in data tree.
- *
{@link NodeIdentifierWithPredicates} - Identifier of node (list item),
- * which has cardinality 0..n.
- *
{@link NodeWithValue} - Identifier of instance leaf node or
- * leaf-list node.
- *
{@link AugmentationIdentifier} - Identifier of instance of
- * augmentation node.
+ *
{@link NodeIdentifier} - Identifier of node, which has cardinality {@code 0..1} in particular subtree in data
+ * tree
+ *
{@link NodeIdentifierWithPredicates} - Identifier of node (list item), which has cardinality {@code 0..n}
+ *
{@link NodeWithValue} - Identifier of instance {@code leaf} node or {@code leaf-list} node
+ *
{@link AugmentationIdentifier} - Identifier of instance of {@code augmentation} node
*
*
* @see RFC6020
*/
-// FIXME: 4.0.0: this concept needs to be moved to yang-common, as parser components need the ability to refer
+// FIXME: 7.0.0: this concept needs to be moved to yang-common, as parser components need the ability to refer
// to data nodes -- most notably XPath expressions and {@code default} statement arguments need to be able
// to represent these.
public abstract class YangInstanceIdentifier implements Path, Immutable, Serializable {
@@ -129,7 +122,6 @@ public abstract class YangInstanceIdentifier implements Path values() {
return SingletonSet.of(value);
@@ -652,6 +663,11 @@ public abstract class YangInstanceIdentifier implements Path values() {
return keyValues.values();
@@ -723,12 +739,6 @@ public abstract class YangInstanceIdentifier implements Path keyValues) {
- return of(node, keyValues.getEntry());
- }
-
private static @NonNull NodeIdentifierWithPredicates of(final Map keyValues, final QName node) {
return of(node, keyValues.entrySet().iterator().next());
}
@@ -738,7 +748,6 @@ public abstract class YangInstanceIdentifier implements Path> entrySet();
/**
@@ -746,15 +755,22 @@ public abstract class YangInstanceIdentifier implements Path keySet();
+ /**
+ * Determine whether a particular predicate key is present.
+ *
+ * @param key Predicate key
+ * @return True if the predicate is present, false otherwise
+ * @throws NullPointerException if {@code key} is null
+ */
+ public abstract boolean containsKey(QName key);
+
/**
* Return the predicate values in the iteration order of {@link #entrySet()}.
*
* @return Predicate values.
*/
- @Beta
public abstract @NonNull Collection