public LogBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.actions.action.Log>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.actions.action.Log> augmentation) { if (augmentation == null) { return removeAugmentation(augmentationType); } if (!(this.augmentation instanceof HashMap)) { this.augmentation = new HashMap<>(); } this.augmentation.put(augmentationType, augmentation); return this; }
private LogImpl(LogBuilder base) { this._log = base.getLog(); 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.intent.rev150122.intent.actions.action.Log>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.actions.action.Log>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.actions.action.Log>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.actions.action.Log>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }