public DestinationPortRangeBuilder(DestinationPortRange base) { this._lowerPort = base.getLowerPort(); this._upperPort = base.getUpperPort(); if (base instanceof DestinationPortRangeImpl) { DestinationPortRangeImpl impl = (DestinationPortRangeImpl) base; if (!impl.augmentation.isEmpty()) { this.augmentation = new HashMap<>(impl.augmentation); } } else if (base instanceof AugmentationHolder) { @SuppressWarnings("unchecked") AugmentationHolder<DestinationPortRange> casted =(AugmentationHolder<DestinationPortRange>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
public DestinationPortRangeBuilder(DestinationPortRange base) { this._lowerPort = base.getLowerPort(); this._upperPort = base.getUpperPort(); if (base instanceof DestinationPortRangeImpl) { DestinationPortRangeImpl impl = (DestinationPortRangeImpl) 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.packet.fields.rev160708.acl.transport.header.fields.DestinationPortRange> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.packet.fields.rev160708.acl.transport.header.fields.DestinationPortRange>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
static void bindDestinationPortRange(@Nonnull final AclRule rule, @Nullable final DestinationPortRange destinationPortRange) { // allow all ports by default: rule.dstportOrIcmpcodeFirst = 0; rule.dstportOrIcmpcodeLast = MAX_PORT_NUMBER; if(destinationPortRange != null) { // lower port is mandatory rule.dstportOrIcmpcodeFirst = portNumber(destinationPortRange.getLowerPort()); if (destinationPortRange.getUpperPort() != null) { rule.dstportOrIcmpcodeLast = portNumber(destinationPortRange.getUpperPort()); } else { // if upper port is missing, set lower port value as end of checked range: rule.dstportOrIcmpcodeLast = rule.dstportOrIcmpcodeFirst; } } }
return false; if (!Objects.equals(_upperPort, other.getUpperPort())) { return false;
return false; if (!Objects.equals(_upperPort, other.getUpperPort())) { return false;