private BucketImpl(BucketBuilder base) { if (base.getKey() == null) { this._key = new BucketKey( base.getBucketId() ); this._bucketId = base.getBucketId(); } else { this._key = base.getKey(); this._bucketId = _key.getBucketId(); } this._action = base.getAction(); this._watchGroup = base.getWatchGroup(); this._watchPort = base.getWatchPort(); this._weight = base.getWeight(); 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.group.types.rev131018.group.buckets.Bucket>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.buckets.Bucket>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.buckets.Bucket>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.group.buckets.Bucket>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
public BucketBuilder(Bucket base) { if (base.getKey() == null) { this._key = new BucketKey( base.getBucketId() ); this._bucketId = base.getBucketId(); } else { this._key = base.getKey(); this._bucketId = _key.getBucketId(); } this._action = base.getAction(); this._watchGroup = base.getWatchGroup(); this._watchPort = base.getWatchPort(); this._weight = base.getWeight(); if (base instanceof BucketImpl) { BucketImpl _impl = (BucketImpl) base; this.augmentation = new HashMap<>(_impl.augmentation); } }