[New] Changed StrolchRootElement.setRelations(String, Collection)
This commit is contained in:
parent
55016449c6
commit
f572973309
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue