[YANGTOOLS-420] YangInstanceIdentifier builder: allow adding PathArgument nodes Created: 12/Mar/15  Updated: 10/Apr/22  Resolved: 27/Aug/15

Status: Resolved
Project: yangtools
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement
Reporter: Robert Varga Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All



 Description   

Adding pre-constructed PathArguments onto a builder can be useful, as it allows us to share object instances with other code.

Instantiating a builder is advantegeous when we want to pre-construct a YangInstanceIdentifier for reuse.

Right now I have to do the following:
newTablesRoot = YangInstanceIdentifier.builder(newPeerPath.node(EMPTY_ADJRIBIN.getIdentifier()).node(TABLES)).build();

Where I should be able to do the following:

newTablesRoot = YangInstanceIdentifier.builder(newPeerPath).node(EMPTY_ADJRIBIN.getIdentifier()).node(TABLES).build();

Which is more efficient.



 Comments   
Comment by Robert Varga [ 27/Aug/15 ]

Fixed in https://git.opendaylight.org/gerrit/21807.

Generated at Wed Feb 07 20:53:11 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.