X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=yang%2Fyang-data-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fdata%2Fapi%2FYangInstanceIdentifier.java;h=7ee6cf8a9b396f92fcf10b99450db7c91f0c949e;hb=6bb7f3a20168a59eeeea366d7d30fa29702e522f;hp=a8a02c84189d730ed8a0b55661c286d9a91bcd12;hpb=ac6b1c788424ca50221ce7b243e4255a8b6fe4c4;p=yangtools.git diff --git a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/YangInstanceIdentifier.java b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/YangInstanceIdentifier.java index a8a02c8418..7ee6cf8a9b 100644 --- a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/YangInstanceIdentifier.java +++ b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/YangInstanceIdentifier.java @@ -46,18 +46,18 @@ import org.opendaylight.yangtools.yang.data.api.schema.LeafSetEntryNode; * 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. - *

- *

Path Arguments

+ * *

+ *

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. - *

+ * * * - * * @see RFC6020 */ public abstract class YangInstanceIdentifier implements Path, Immutable, Serializable { @@ -92,7 +91,9 @@ public abstract class YangInstanceIdentifier implements Path tryPathArguments(); + @Nonnull abstract Collection tryReversePathArguments(); /** @@ -127,7 +128,7 @@ public abstract class YangInstanceIdentifier implements Path * This interface itself is used as common parent for actual * path arguments types and should not be implemented by user code. + * *

* Path arguments SHOULD contain only minimum of information * required to uniquely identify node on particular subtree level. * + *

* For actual path arguments types see: *

    *
  • {@link NodeIdentifier} - Identifier of container or leaf @@ -394,6 +396,7 @@ public abstract class YangInstanceIdentifier implements Path * This method may return null, if the corresponding schema node, does * not have QName associated, such as in cases of augmentations. * @@ -413,7 +416,7 @@ public abstract class YangInstanceIdentifier implements Path * Augmentation is uniquely identified by set of all possible child nodes. * This is possible * to identify instance of augmentation, @@ -638,7 +643,6 @@ public abstract class YangInstanceIdentifier implements PathRFC6020 */ public static final class AugmentationIdentifier implements PathArgument { @@ -652,9 +656,8 @@ public abstract class YangInstanceIdentifier implements Path otherIterator = otherChildNames.iterator(); for (QName name : childNames) { - int c = name.compareTo(otherIterator.next()); - if (c != 0) { - return c; + int child = name.compareTo(otherIterator.next()); + if (child != 0) { + return child; } } return 0; @@ -727,7 +731,7 @@ public abstract class YangInstanceIdentifier implements Path { /** @@ -747,7 +751,8 @@ public abstract class YangInstanceIdentifier implements Path