[New] Changed StrolchRootElement.setRelations(String, Collection)

This commit is contained in:
Robert von Burg 2023-07-18 16:33:11 +02:00
parent 55016449c6
commit f572973309
Signed by: eitch
GPG Key ID: 75DB9C85C74331F7
2 changed files with 4 additions and 2 deletions

View File

@ -3,6 +3,7 @@ package li.strolch.model;
import li.strolch.model.parameter.StringListParameter;
import li.strolch.model.parameter.StringParameter;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
@ -48,7 +49,7 @@ public abstract class AbstractStrolchRootElement extends GroupedParameterizedEle
}
@Override
public void setRelations(String param, List<? extends StrolchRootElement> elements) {
public void setRelations(String param, Collection<? extends StrolchRootElement> elements) {
// validate we have same objects
List<String> objectTypes = elements.stream().map(StrolchRootElement::getObjectType).distinct().toList();

View File

@ -17,6 +17,7 @@ package li.strolch.model;
import static li.strolch.model.StrolchModelConstants.*;
import java.util.Collection;
import java.util.List;
import com.google.gson.Gson;
@ -104,7 +105,7 @@ public interface StrolchRootElement extends StrolchElement, PolicyContainer, Par
* @param elements
* the elements for which to set the relations to
*/
void setRelations(String param, List<? extends StrolchRootElement> elements);
void setRelations(String param, Collection<? extends StrolchRootElement> elements);
/**
* Adds a relation to the given element by using the given parameter ID. Should the {@link StringListParameter} not