final String nshName = nshEntryContext.getName(detail.entryIndex, context.getMappingContext()); LOG.debug("vppstate.NshEntryCustomizer.getAllIds: nName={}", nshName); allIds.add(new NshEntryKey(nshName));
private NshEntryImpl(NshEntryBuilder base) { if (base.getKey() == null) { this._key = new NshEntryKey( base.getName() ); this._name = base.getName(); } else { this._key = base.getKey(); this._name = _key.getName(); } this._length = base.getLength(); this._mdType = base.getMdType(); this._nextProtocol = base.getNextProtocol(); this._nsi = base.getNsi(); this._nsp = base.getNsp(); this._version = base.getVersion(); 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.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.nsh.entries.NshEntry>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.nsh.entries.NshEntry>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.nsh.entries.NshEntry>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.nsh.entries.NshEntry>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
public NshEntryBuilder(NshEntry base) { if (base.getKey() == null) { this._key = new NshEntryKey( base.getName() ); this._name = base.getName(); } else { this._key = base.getKey(); this._name = _key.getName(); } this._length = base.getLength(); this._mdType = base.getMdType(); this._nextProtocol = base.getNextProtocol(); this._nsi = base.getNsi(); this._nsp = base.getNsp(); this._version = base.getVersion(); if (base instanceof NshEntryImpl) { NshEntryImpl impl = (NshEntryImpl) base; if (!impl.augmentation.isEmpty()) { this.augmentation = new HashMap<>(impl.augmentation); } } else if (base instanceof AugmentationHolder) { @SuppressWarnings("unchecked") AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.nsh.entries.NshEntry> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nsh.rev160624.vpp.nsh.state.nsh.entries.NshEntry>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }