private DeviceLinksImpl(DeviceLinksBuilder base) { if (base.getKey() == null) { this._key = new DeviceLinksKey( base.getLinkRef() ); this._linkRef = base.getLinkRef(); } else { this._key = base.getKey(); this._linkRef = _key.getLinkRef(); } switch (base.augmentation.size()) { case 0: this.augmentation = Collections.emptyMap(); break; case 1: final Map.Entry<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.fabric.rev150930.fabric.attributes.DeviceLinks>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.fabric.rev150930.fabric.attributes.DeviceLinks>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.fabric.rev150930.fabric.attributes.DeviceLinks>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.fabric.rev150930.fabric.attributes.DeviceLinks>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
public DeviceLinksBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.fabric.rev150930.fabric.attributes.DeviceLinks>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.faas.fabric.rev150930.fabric.attributes.DeviceLinks> augmentation) { if (augmentation == null) { return removeAugmentation(augmentationType); } if (!(this.augmentation instanceof HashMap)) { this.augmentation = new HashMap<>(); } this.augmentation.put(augmentationType, augmentation); return this; }
DeviceLinksBuilder linkBuilder = new DeviceLinksBuilder(); linkBuilder.setKey(new DeviceLinksKey(link)).setLinkRef(link).build(); trans.put(LogicalDatastoreType.OPERATIONAL, path, linkBuilder.build(), false);