@Override public Notification build() { return new NotificationImpl(this); }
NotificationImpl(NotificationBuilder base) { this._eventTime = base.getEventTime(); this.augmentation = ImmutableMap.copyOf(base.augmentation); }
public NotificationBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.notification.Notification>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.notification.Notification> augmentation) { if (augmentation == null) { return removeAugmentation(augmentationType); } if (!(this.augmentation instanceof HashMap)) { this.augmentation = new HashMap<>(); } this.augmentation.put(augmentationType, augmentation); return this; }
if (!Objects.equals(_eventTime, other.getEventTime())) { return false; if (!e.getValue().equals(other.augmentation(e.getKey()))) { return false;
if (other.getEventTime() != null) { return false; } else if(!_eventTime.equals(other.getEventTime())) { return false; if (!e.getValue().equals(other.getAugmentation(e.getKey()))) { return false;
public NotificationBuilder(Notification base) { this._eventTime = base.getEventTime(); if (base instanceof NotificationImpl) { NotificationImpl impl = (NotificationImpl) base; if (!impl.augmentation.isEmpty()) { this.augmentation = new HashMap<>(impl.augmentation); } } else if (base instanceof AugmentationHolder) { @SuppressWarnings("unchecked") Map<Class<? extends Augmentation<Notification>>, Augmentation<Notification>> aug =((AugmentationHolder<Notification>) base).augmentations(); if (!aug.isEmpty()) { this.augmentation = new HashMap<>(aug); } } }
public Notification build() { return new NotificationImpl(this); }
private NotificationImpl(NotificationBuilder base) { this._eventTime = base.getEventTime(); 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.restconf.rev131019.notification.Notification>>, Augmentation<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.notification.Notification>> 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.restconf.rev131019.notification.Notification>>, Augmentation<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.notification.Notification>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
public NotificationBuilder addAugmentation(Class<? extends Augmentation<Notification>> augmentationType, Augmentation<Notification> augmentationValue) { if (augmentationValue == null) { return removeAugmentation(augmentationType); } if (!(this.augmentation instanceof HashMap)) { this.augmentation = new HashMap<>(); } this.augmentation.put(augmentationType, augmentationValue); return this; }
public NotificationBuilder(Notification base) { this._eventTime = base.getEventTime(); if (base instanceof NotificationImpl) { NotificationImpl impl = (NotificationImpl) 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.ietf.params.xml.ns.yang.ietf.restconf.rev131019.notification.Notification> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.restconf.rev131019.notification.Notification>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }