public class ParameterCollectionList extends ListParameter<JIPipeDynamicParameterCollection>
JIPipeParameterCollection
items (internally JIPipeDynamicParameterCollection
.
We suggest to use this parameter instead of defining custom pairs (PairParameter
or functions (FunctionParameter
You should provide a template JIPipeParameterCollection
class (that is instantiable) to automatically populate newly created JIPipeDynamicParameterCollection
with values. Provide this class via the containingCollection() static method
Modifier and Type | Class and Description |
---|---|
static class |
ParameterCollectionList.Deserializer |
static class |
ParameterCollectionList.Serializer |
modCount
Constructor and Description |
---|
ParameterCollectionList() |
ParameterCollectionList(ParameterCollectionList other) |
Modifier and Type | Method and Description |
---|---|
void |
addFromTemplate(JIPipeParameterCollection source) |
JIPipeDynamicParameterCollection |
addNewInstance()
Adds a new instance of the content class
Override this method for types that cannot be default-constructed
|
void |
applyTemplateToItems()
Applies the entries of the current template to all items (adding/removing/changing items)
|
static ParameterCollectionList |
containingCollection(Class<? extends JIPipeParameterCollection> klass)
Creates an instance from a template collection class.
|
static ParameterCollectionList |
containingSingle(Class<?> klass)
Creates an instance that contains a parameter of a specific value
|
JIPipeDynamicParameterCollection |
getTemplate()
Returns the template object for new items
|
<T extends JIPipeParameterCollection> |
mapToCollection(Class<T> klass)
Maps the items to a
JIPipeParameterCollection type. |
void |
setTemplate(JIPipeDynamicParameterCollection template)
Sets the template for new items
|
getContentClass, getCustomInstanceGenerator, reportValidity, setCustomInstanceGenerator
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
generateValidityReport
containsAll, equals, hashCode
parallelStream, stream
public ParameterCollectionList()
public ParameterCollectionList(ParameterCollectionList other)
public static ParameterCollectionList containingCollection(Class<? extends JIPipeParameterCollection> klass)
klass
- the template collection. must be instantiable.public static ParameterCollectionList containingSingle(Class<?> klass)
klass
- the type of parameter that is containedpublic JIPipeDynamicParameterCollection getTemplate()
public void setTemplate(JIPipeDynamicParameterCollection template)
template
- the templatepublic <T extends JIPipeParameterCollection> List<T> mapToCollection(Class<T> klass)
JIPipeParameterCollection
type. Useful if you created this list based on a template.T
- the collection classklass
- the collection classpublic JIPipeDynamicParameterCollection addNewInstance()
ListParameter
addNewInstance
in class ListParameter<JIPipeDynamicParameterCollection>
public void addFromTemplate(JIPipeParameterCollection source)
public void applyTemplateToItems()
Copyright © 2020–2022 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.