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