Invert SchemaInferenceStack.deque 17/100517/8
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 10 Apr 2022 14:29:16 +0000 (16:29 +0200)
committerRobert Varga <nite@hq.sk>
Thu, 14 Apr 2022 10:48:59 +0000 (10:48 +0000)
commit502ec3268436a6f662fae661462baf3c2f73b5ad
treea7a5b9f30c80b20cbf656a7fc97c24d333a3a54e
parent93048afc8037fd8bb631150361b05e4ab482a623
Invert SchemaInferenceStack.deque

While the use of the deque as a stack is kind of easy, it results in us
needing to operate on descendingIterator() rather than on Colleciton.
Invert the organization of the deque so that its iteration order
reflects the path from root. This has a number of benefits in terms of
code density.

JIRA: YANGTOOLS-1422
Change-Id: I442ef43cfe52842e334b48d32b901e5266041f59
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
model/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/SchemaInferenceStack.java