public EndPointSelector build() { return new EndPointSelectorImpl(this); }
public EndPointSelectorBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.selector.EndPointSelector>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.selector.EndPointSelector> augmentation) { if (augmentation == null) { return removeAugmentation(augmentationType); } if (!(this.augmentation instanceof HashMap)) { this.augmentation = new HashMap<>(); } this.augmentation.put(augmentationType, augmentation); return this; }
public EndPointSelectorBuilder(EndPointSelector base) { this._endPointSelector = base.getEndPointSelector(); if (base instanceof EndPointSelectorImpl) { EndPointSelectorImpl impl = (EndPointSelectorImpl) 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.selector.EndPointSelector> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.selector.EndPointSelector>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
if (other.getEndPointSelector() != null) { return false; } else if(!_endPointSelector.equals(other.getEndPointSelector())) { return false; if (!e.getValue().equals(other.getAugmentation(e.getKey()))) { return false;
private EndPointSelectorImpl(EndPointSelectorBuilder base) { this._endPointSelector = base.getEndPointSelector(); 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.selector.EndPointSelector>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.selector.EndPointSelector>> 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.selector.EndPointSelector>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.selector.EndPointSelector>>singletonMap(e.getKey(), e.getValue()); break; default : this.augmentation = new HashMap<>(base.augmentation); } }
if (!Objects.equals(_endPointSelector, other.getEndPointSelector())) { return false; if (!e.getValue().equals(other.getAugmentation(e.getKey()))) { return false;
public EndPointSelectorBuilder(EndPointSelector base) { this._endPointSelector = base.getEndPointSelector(); if (base instanceof EndPointSelectorImpl) { EndPointSelectorImpl impl = (EndPointSelectorImpl) 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.selector.EndPointSelector> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.selector.EndPointSelector>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
public EndPointSelector build() { return new EndPointSelectorImpl(this); }
public EndPointSelectorBuilder addAugmentation(java.lang.Class<? extends Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.selector.EndPointSelector>> augmentationType, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.selector.EndPointSelector> augmentation) { if (augmentation == null) { return removeAugmentation(augmentationType); } if (!(this.augmentation instanceof HashMap)) { this.augmentation = new HashMap<>(); } this.augmentation.put(augmentationType, augmentation); return this; }
private EndPointSelectorImpl(EndPointSelectorBuilder base) { this._endPointSelector = base.getEndPointSelector(); 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.selector.EndPointSelector>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.selector.EndPointSelector>> 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.selector.EndPointSelector>>, Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.subjects.subject.end.point.selector.EndPointSelector>>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; }