if (!Objects.equals(_key, other.getKey())) { return false; if (!Objects.equals(_order, other.getOrder())) { return false; if (!Objects.equals(_subject, other.getSubject())) { return false; if (!e.getValue().equals(other.getAugmentation(e.getKey()))) { return false;
public SubjectsBuilder(Subjects base) { if (base.getKey() == null) { this._key = new SubjectsKey( base.getOrder() ); this._order = base.getOrder(); } else { this._key = base.getKey(); this._order = _key.getOrder(); } this._subject = base.getSubject(); if (base instanceof SubjectsImpl) { SubjectsImpl impl = (SubjectsImpl) 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> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.Subjects>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
sb.append(String.format("Subjects: \n")); for (Subjects subjects : intent.getSubjects()) { EndPointGroup endPointGroup = (EndPointGroup) subjects.getSubject(); sb.append(String.format(" Order: %d\n", subjects.getOrder())); sb.append(String.format(" " + value + ": %s\n", endPointGroup.getEndPointGroup().getName())); sb.append("\n");
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; }
@Override public Short apply(Subjects input) { return input.getOrder(); } }).immutableSortedCopy(intent.getSubjects());
public SubjectsBuilder(Subjects base) { if (base.getKey() == null) { this._key = new SubjectsKey( base.getOrder() ); this._order = base.getOrder(); } else { this._key = base.getKey(); this._order = _key.getOrder(); } this._subject = base.getSubject(); if (base instanceof SubjectsImpl) { SubjectsImpl impl = (SubjectsImpl) 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> casted =(AugmentationHolder<org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.Subjects>) base; if (!casted.augmentations().isEmpty()) { this.augmentation = new HashMap<>(casted.augmentations()); } } }
EndPointGroup sourceContainer = (EndPointGroup) intent.getSubjects().get(0).getSubject(); EndPointGroup destinationContainer = (EndPointGroup) intent.getSubjects().get(1).getSubject(); org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.actions.Action actionContainer = (org.opendaylight.yang.gen.v1.urn.opendaylight.intent.rev150122.intent.actions.Action)
if (other.getKey() != null) { return false; } else if(!_key.equals(other.getKey())) { return false; if (other.getOrder() != null) { return false; } else if(!_order.equals(other.getOrder())) { return false; if (other.getSubject() != null) { return false; } else if(!_subject.equals(other.getSubject())) { return false; if (!e.getValue().equals(other.getAugmentation(e.getKey()))) { return false;
&& subjects.size() == 2) { if (subjects.get(0).getSubject() instanceof EndPointGroup && subjects.get(1).getSubject() instanceof EndPointGroup) { String from = ((EndPointGroup) subjects.get(0).getSubject()).getEndPointGroup().getName(); String to = ((EndPointGroup) subjects.get(1).getSubject()).getEndPointGroup().getName(); String bandwidthStr = constraint.getBandwidthConstraint().getBandwidth(); long bandwidth = parseBandwidthString(bandwidthStr);