Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-105

A copy constructor for builder of list/container yang statements

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Resolution: Duplicate
    • None
    • None
    • None
    • None
    • Operating System: Windows
      Platform: PC

    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); }

      }

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Unassigned Unassigned
              msunal@cisco.com Martin Sunal
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: