[New] Added new method .getParameterBagsByType()
This commit is contained in:
parent
22538dc7fa
commit
ca50609131
|
@ -19,8 +19,10 @@ import java.text.MessageFormat;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import li.strolch.exception.StrolchException;
|
import li.strolch.exception.StrolchException;
|
||||||
import li.strolch.exception.StrolchModelException;
|
import li.strolch.exception.StrolchModelException;
|
||||||
|
@ -225,6 +227,21 @@ public abstract class GroupedParameterizedElement extends AbstractStrolchElement
|
||||||
return parameterBag;
|
return parameterBag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the {@link ParameterBag ParameterBags} of the given type
|
||||||
|
*
|
||||||
|
* @param type
|
||||||
|
* the type of {@link ParameterBag} to return
|
||||||
|
*
|
||||||
|
* @return the {@link ParameterBag ParameterBags} of the given type
|
||||||
|
*/
|
||||||
|
public List<ParameterBag> getParameterBagsByType(String type) {
|
||||||
|
return this.parameterBagMap.values() //
|
||||||
|
.stream() //
|
||||||
|
.filter(map -> map.getType().equals(type)) //
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the given {@link ParameterBag} to this {@link GroupedParameterizedElement}
|
* Adds the given {@link ParameterBag} to this {@link GroupedParameterizedElement}
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue