public EndPointGroupSelector build() { return new EndPointGroupSelectorImpl(this); }
public EndPointGroupSelectorBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.group.selector.EndPointGroupSelector>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.group.selector.EndPointGroupSelector> augmentation) { if (augmentation == null) { return removeAugmentation(augmentationType); } if (!(this.augmentation instanceof HashMap)) { this.augmentation = new HashMap<>(); } this.augmentation.put(augmentationType, augmentation); return this; }
public EndPointGroupSelectorBuilder(EndPointGroupSelector base) { this._endPointGroupSelector = base.getEndPointGroupSelector(); if (base instanceof EndPointGroupSelectorImpl) { EndPointGroupSelectorImpl impl = (EndPointGroupSelectorImpl) 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.opendaylight.intent.rev150122.intent.subjects.subject.end.point.group.selector.EndPointGroupSelector> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.group.selector.EndPointGroupSelector>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
if (other.getEndPointGroupSelector() != null) { return false; } else if(!_endPointGroupSelector.equals(other.getEndPointGroupSelector())) { return false; if (!e.getValue().equals(other.getAugmentation(e.getKey()))) { return false;
private EndPointGroupSelectorImpl(EndPointGroupSelectorBuilder base) { this._endPointGroupSelector = base.getEndPointGroupSelector(); 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.intent.rev150122.intent.subjects.subject.end.point.group.selector.EndPointGroupSelector>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.group.selector.EndPointGroupSelector>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.group.selector.EndPointGroupSelector>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.group.selector.EndPointGroupSelector>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
if (!Objects.equals(_endPointGroupSelector, other.getEndPointGroupSelector())) { return false; if (!e.getValue().equals(other.getAugmentation(e.getKey()))) { return false;
public EndPointGroupSelectorBuilder(EndPointGroupSelector base) { this._endPointGroupSelector = base.getEndPointGroupSelector(); if (base instanceof EndPointGroupSelectorImpl) { EndPointGroupSelectorImpl impl = (EndPointGroupSelectorImpl) 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.opendaylight.intent.rev150122.intent.subjects.subject.end.point.group.selector.EndPointGroupSelector> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.group.selector.EndPointGroupSelector>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
public EndPointGroupSelector build() { return new EndPointGroupSelectorImpl(this); }
public EndPointGroupSelectorBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.group.selector.EndPointGroupSelector>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.group.selector.EndPointGroupSelector> augmentation) { if (augmentation == null) { return removeAugmentation(augmentationType); } if (!(this.augmentation instanceof HashMap)) { this.augmentation = new HashMap<>(); } this.augmentation.put(augmentationType, augmentation); return this; }
private EndPointGroupSelectorImpl(EndPointGroupSelectorBuilder base) { this._endPointGroupSelector = base.getEndPointGroupSelector(); 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.intent.rev150122.intent.subjects.subject.end.point.group.selector.EndPointGroupSelector>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.group.selector.EndPointGroupSelector>> e = base.augmentation.entrySet().iterator().next(); this.augmentation = Collections.<java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.group.selector.EndPointGroupSelector>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.group.selector.EndPointGroupSelector>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
private String getEndpointIdentifier(Subjects subject) { String endpointGroupIdentifier = ""; //Retrieve the appropriate endpoint group identifier if (subject.getSubject() instanceof EndPointSelector) { EndPointSelector endPointSelector = (EndPointSelector) subject.getSubject(); endpointGroupIdentifier = endPointSelector.getEndPointSelector().getEndPointSelector(); } if (subject.getSubject() instanceof EndPointGroupSelector) { EndPointGroupSelector endPointGroupSelector = (EndPointGroupSelector) subject.getSubject(); endpointGroupIdentifier = endPointGroupSelector.getEndPointGroupSelector().getEndPointGroupSelector(); } if (subject.getSubject() instanceof EndPointGroup) { EndPointGroup endPointGroup = (EndPointGroup) subject.getSubject(); endpointGroupIdentifier = endPointGroup.getEndPointGroup().getName(); } return endpointGroupIdentifier; }