[YANGTOOLS-105] A copy constructor for builder of list/container yang statements Created: 20/Mar/14  Updated: 10/Apr/22  Resolved: 28/Mar/14

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

Type: Improvement
Reporter: Martin Sunal Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Windows
Platform: PC


Issue Links:
Duplicate
duplicates YANGTOOLS-103 builder - copy contructor / fieldsFrom Resolved

 Description   

Builder which is generated for list and container yang statements should contain a copy constructor where parameter is type of build() method.
Example:

public class GroupBuilder {

public GroupBuilder(Group group) {
if (group instanceof GroupImpl)

{ GroupImpl groupImpl = (GroupImpl) group; // copy attributes here }

}

public Group build()

{ return new GroupImpl(this); }

}


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