NeighborImpl(NeighborBuilder base) { if (base.key() != null) { this.key = base.key(); } else { this.key = new NeighborKey(base.getIp()); } this._ip = key.getIp(); this._linkLayerAddress = base.getLinkLayerAddress(); this._origin = base.getOrigin(); this.augmentation = ImmutableMap.copyOf(base.augmentation); }
public NeighborBuilder addAugmentation(Class<? extends Augmentation<Neighbor>> augmentationType, Augmentation<Neighbor> augmentationValue) { if (augmentationValue == null) { return removeAugmentation(augmentationType); } if (!(this.augmentation instanceof HashMap)) { this.augmentation = new HashMap<>(); } this.augmentation.put(augmentationType, augmentationValue); return this; }
@Override public NeighborBuilder getBuilder(InstanceIdentifier<Neighbor> id) { return new NeighborBuilder(); }
private NeighborImpl(NeighborBuilder base) { if (base.getKey() == null) { this._key = new NeighborKey( base.getIp() ); this._ip = base.getIp(); } else { this._key = base.getKey(); this._ip = _key.getIp(); } this._linkLayerAddress = base.getLinkLayerAddress(); this._origin = base.getOrigin(); 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.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.ipv4.Neighbor>>, Augmentation<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.ipv4.Neighbor>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.ipv4.Neighbor>>, Augmentation<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.ipv4.Neighbor>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
private NeighborImpl(NeighborBuilder base) { if (base.getKey() == null) { this._key = new NeighborKey( base.getIp() ); this._ip = base.getIp(); } else { this._key = base.getKey(); this._ip = _key.getIp(); } this._linkLayerAddress = base.getLinkLayerAddress(); this._origin = base.getOrigin(); 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.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.ipv4.Neighbor>>, Augmentation<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.ipv4.Neighbor>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.ipv4.Neighbor>>, Augmentation<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.ipv4.Neighbor>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
private NeighborImpl(NeighborBuilder base) { if (base.key() == null) { this.key = new NeighborKey( base.getIp() ); this._ip = base.getIp(); } else { this.key = base.key(); this._ip = key.getIp(); } this._linkLayerAddress = base.getLinkLayerAddress(); this._origin = base.getOrigin(); this.augmentation = ImmutableMap.copyOf(base.augmentation); }
public NeighborBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.ipv4.Neighbor>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.ipv4.Neighbor> augmentation) { if (augmentation == null) { return removeAugmentation(augmentationType); } if (!(this.augmentation instanceof HashMap)) { this.augmentation = new HashMap<>(); } this.augmentation.put(augmentationType, augmentation); return this; }
public NeighborBuilder addAugmentation(Class<? extends Augmentation<Neighbor>> augmentationType, Augmentation<Neighbor> augmentationValue) { if (augmentationValue == null) { return removeAugmentation(augmentationType); } if (!(this.augmentation instanceof HashMap)) { this.augmentation = new HashMap<>(); } this.augmentation.put(augmentationType, augmentationValue); return this; }
public NeighborBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.ipv4.Neighbor>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces.state._interface.ipv4.Neighbor> augmentation) { if (augmentation == null) { return removeAugmentation(augmentationType); } if (!(this.augmentation instanceof HashMap)) { this.augmentation = new HashMap<>(); } this.augmentation.put(augmentationType, augmentation); return this; }