public MeterFeatures build() { return new MeterFeaturesImpl(this); }
public MeterFeaturesBuilder(MeterFeatures base) { this._maxBands = base.getMaxBands(); this._maxColor = base.getMaxColor(); this._maxMeter = base.getMaxMeter(); this._meterBandSupported = base.getMeterBandSupported(); this._meterCapabilitiesSupported = base.getMeterCapabilitiesSupported(); if (base instanceof MeterFeaturesImpl) { MeterFeaturesImpl _impl = (MeterFeaturesImpl) base; this.augmentation = new HashMap<>(_impl.augmentation); } }
public MeterFeaturesBuilder setMaxBands(java.lang.Short value) { if (value != null) { BigInteger _constraint = BigInteger.valueOf(value); boolean isValidRange = false; for (Range<BigInteger> r : _maxBands_range()) { if (r.contains(_constraint)) { isValidRange = true; } } if (!isValidRange) { throw new IllegalArgumentException(String.format("Invalid range: %s, expected: %s.", value, _maxBands_range)); } } this._maxBands = value; return this; } public static List<Range<BigInteger>> _maxBands_range() {
break; final MeterFeatures stats = new MeterFeaturesBuilder((MeterFeaturesUpdated)notif).build(); final InstanceIdentifier<NodeMeterFeatures> nodeMeterFeatureIdent = nodeIdent.augmentation(NodeMeterFeatures.class);
private MeterFeaturesImpl(MeterFeaturesBuilder base) { this._maxBands = base.getMaxBands(); this._maxColor = base.getMaxColor(); this._maxMeter = base.getMaxMeter(); this._meterBandSupported = base.getMeterBandSupported(); this._meterCapabilitiesSupported = base.getMeterCapabilitiesSupported(); 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.statistics.rev131111.nodes.node.MeterFeatures>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.nodes.node.MeterFeatures>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.nodes.node.MeterFeatures>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.meter.statistics.rev131111.nodes.node.MeterFeatures>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
public MeterFeaturesBuilder setMaxColor(java.lang.Short value) { if (value != null) { BigInteger _constraint = BigInteger.valueOf(value); boolean isValidRange = false; for (Range<BigInteger> r : _maxColor_range()) { if (r.contains(_constraint)) { isValidRange = true; } } if (!isValidRange) { throw new IllegalArgumentException(String.format("Invalid range: %s, expected: %s.", value, _maxColor_range)); } } this._maxColor = value; return this; } public static List<Range<BigInteger>> _maxColor_range() {
public MeterFeaturesBuilder setMaxMeter(Counter32 value) { if (value != null) { BigInteger _constraint = BigInteger.valueOf(value.getValue()); boolean isValidRange = false; for (Range<BigInteger> r : _maxMeter_range()) { if (r.contains(_constraint)) { isValidRange = true; } } if (!isValidRange) { throw new IllegalArgumentException(String.format("Invalid range: %s, expected: %s.", value, _maxMeter_range)); } } this._maxMeter = value; return this; } public static List<Range<BigInteger>> _maxMeter_range() {
if (other.getMaxBands() != null) { return false; } else if(!_maxBands.equals(other.getMaxBands())) { return false; if (other.getMaxColor() != null) { return false; } else if(!_maxColor.equals(other.getMaxColor())) { return false; if (other.getMaxMeter() != null) { return false; } else if(!_maxMeter.equals(other.getMaxMeter())) { return false; if (other.getMeterBandSupported() != null) { return false; } else if(!_meterBandSupported.equals(other.getMeterBandSupported())) { return false; if (other.getMeterCapabilitiesSupported() != null) { return false; } else if(!_meterCapabilitiesSupported.equals(other.getMeterCapabilitiesSupported())) { return false;
break; final MeterFeatures stats = new MeterFeaturesBuilder((MeterFeaturesUpdated)notif).build(); final InstanceIdentifier<NodeMeterFeatures> nodeMeterFeatureIdent = nodeIdent.augmentation(NodeMeterFeatures.class);