*/
package org.opendaylight.transportpce.servicehandler;
-import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
-import java.util.List;
import java.util.Map;
import java.util.Set;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.node.types.rev210528.NodeIdType;
|| softConstraintsBuilder.getCustomerCode().isEmpty()) {
softConstraintsBuilder.setCustomerCode(hardConstraints.getCustomerCode());
} else {
- List<String> updatedCustomerCode = new ArrayList<>(softConstraintsBuilder.getCustomerCode());
+ Set<String> updatedCustomerCode = new HashSet<>(softConstraintsBuilder.getCustomerCode());
updatedCustomerCode.addAll(hardConstraints.getCustomerCode());
softConstraintsBuilder.setCustomerCode(updatedCustomerCode);
}
|| softConstraintsBuilder.getOperationalMode().isEmpty()) {
softConstraintsBuilder.setOperationalMode(hardConstraints.getOperationalMode());
} else {
- List<String> updatedOperationalMode = new ArrayList<>(softConstraintsBuilder.getOperationalMode());
+ Set<String> updatedOperationalMode = new HashSet<>(softConstraintsBuilder.getOperationalMode());
updatedOperationalMode.addAll(hardConstraints.getOperationalMode());
softConstraintsBuilder.setOperationalMode(updatedOperationalMode);
}
} else {
Set<String> fiberList = new HashSet<>(includeBldr.getFiberBundle());
fiberList.addAll(hard.getFiberBundle());
- includeBldr.setFiberBundle(new ArrayList<>(fiberList));
+ includeBldr.setFiberBundle(new HashSet<>(fiberList));
}
}
if (hard.getNodeId() != null && !hard.getNodeId().isEmpty()) {
} else {
Set<NodeIdType> nodeIdList = new HashSet<>(includeBldr.getNodeId());
nodeIdList.addAll(hard.getNodeId());
- includeBldr.setNodeId(new ArrayList<>(nodeIdList));
+ includeBldr.setNodeId(new HashSet<>(nodeIdList));
}
}
if (hard.getSite() != null && !hard.getSite().isEmpty()) {
} else {
Set<String> siteList = new HashSet<>(includeBldr.getSite());
siteList.addAll(hard.getSite());
- includeBldr.setSite(new ArrayList<>(siteList));
+ includeBldr.setSite(new HashSet<>(siteList));
}
}
if (hard.getSrlgId() != null && !hard.getSrlgId().isEmpty()) {
} else {
Set<Uint32> srlgList = new HashSet<>(includeBldr.getSrlgId());
srlgList.addAll(hard.getSrlgId());
- includeBldr.setSrlgId(new ArrayList<>(srlgList));
+ includeBldr.setSrlgId(new HashSet<>(srlgList));
}
}
if (hard.getSupportingServiceName() != null && !hard.getSupportingServiceName().isEmpty()) {
} else {
Set<String> serviceList = new HashSet<>(includeBldr.getSupportingServiceName());
serviceList.addAll(hard.getSupportingServiceName());
- includeBldr.setSupportingServiceName(new ArrayList<>(serviceList));
+ includeBldr.setSupportingServiceName(new HashSet<>(serviceList));
}
}
if (hard.getLinkIdentifier() != null && !hard.getLinkIdentifier().isEmpty()) {
} else {
Set<String> fiberList = new HashSet<>(excludeBldr.getFiberBundle());
fiberList.addAll(hard.getFiberBundle());
- excludeBldr.setFiberBundle(new ArrayList<>(fiberList));
+ excludeBldr.setFiberBundle(new HashSet<>(fiberList));
}
}
if (hard.getNodeId() != null && !hard.getNodeId().isEmpty()) {
} else {
Set<NodeIdType> nodeIdList = new HashSet<>(excludeBldr.getNodeId());
nodeIdList.addAll(hard.getNodeId());
- excludeBldr.setNodeId(new ArrayList<>(nodeIdList));
+ excludeBldr.setNodeId(new HashSet<>(nodeIdList));
}
}
if (hard.getSite() != null && !hard.getSite().isEmpty()) {
} else {
Set<String> siteList = new HashSet<>(excludeBldr.getSite());
siteList.addAll(hard.getSite());
- excludeBldr.setSite(new ArrayList<>(siteList));
+ excludeBldr.setSite(new HashSet<>(siteList));
}
}
if (hard.getSrlgId() != null && !hard.getSrlgId().isEmpty()) {
} else {
Set<Uint32> srlgList = new HashSet<>(excludeBldr.getSrlgId());
srlgList.addAll(hard.getSrlgId());
- excludeBldr.setSrlgId(new ArrayList<>(srlgList));
+ excludeBldr.setSrlgId(new HashSet<>(srlgList));
}
}
if (hard.getSupportingServiceName() != null && !hard.getSupportingServiceName().isEmpty()) {
} else {
Set<String> serviceList = new HashSet<>(excludeBldr.getSupportingServiceName());
serviceList.addAll(hard.getSupportingServiceName());
- excludeBldr.setSupportingServiceName(new ArrayList<>(serviceList));
+ excludeBldr.setSupportingServiceName(new HashSet<>(serviceList));
}
}
if (hard.getLinkIdentifier() != null && !hard.getLinkIdentifier().isEmpty()) {