private BandStatImpl(BandStatBuilder base) { if (base.getKey() == null) { this._key = new BandStatKey( base.getBandId() ); this._bandId = base.getBandId(); } else { this._key = base.getKey(); this._bandId = _key.getBandId(); } this._byteBandCount = base.getByteBandCount(); this._packetBandCount = base.getPacketBandCount(); 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.meter.types.rev130918.meter.statistics.meter.band.stats.BandStat>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.meter.statistics.meter.band.stats.BandStat>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.meter.statistics.meter.band.stats.BandStat>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.meter.statistics.meter.band.stats.BandStat>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
public BandStatBuilder(BandStat base) { if (base.getKey() == null) { this._key = new BandStatKey( base.getBandId() ); this._bandId = base.getBandId(); } else { this._key = base.getKey(); this._bandId = _key.getBandId(); } this._byteBandCount = base.getByteBandCount(); this._packetBandCount = base.getPacketBandCount(); if (base instanceof BandStatImpl) { BandStatImpl _impl = (BandStatImpl) base; this.augmentation = new HashMap<>(_impl.augmentation); } }
bandStatBuilder.setPacketBandCount(new Counter64(meterBandStats.getPacketBandCount())); BandId bandId = new BandId((long) bandKey); bandStatBuilder.setKey(new BandStatKey(bandId)); bandStatBuilder.setBandId(bandId); bandKey++;