Class ImmutableMultiStageDescriptor.Builder
java.lang.Object
net.bmahe.genetics4j.gpu.spec.fitness.multistage.ImmutableMultiStageDescriptor.Builder
- Enclosing class:
ImmutableMultiStageDescriptor
@Generated(from="MultiStageDescriptor",
generator="Immutables")
public static final class ImmutableMultiStageDescriptor.Builder
extends Object
Builds instances of type
MultiStageDescriptor.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List<StageDescriptor> private Map<String, StaticDataLoader> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllStageDescriptors(Iterable<? extends StageDescriptor> elements) Adds elements tostageDescriptorslist.addStageDescriptors(StageDescriptor element) Adds one element tostageDescriptorslist.addStageDescriptors(StageDescriptor... elements) Adds elements tostageDescriptorslist.build()Builds a newMultiStageDescriptor.from(MultiStageDescriptor instance) Fill a builder with attribute values from the providedMultiStageDescriptorinstance.putAllStaticDataLoaders(Map<String, ? extends StaticDataLoader> entries) Put all mappings from the specified map as entries tostaticDataLoadersmap.putStaticDataLoaders(String key, StaticDataLoader value) Put one entry to thestaticDataLoadersmap.putStaticDataLoaders(Map.Entry<String, ? extends StaticDataLoader> entry) Put one entry to thestaticDataLoadersmap.stageDescriptors(Iterable<? extends StageDescriptor> elements) Sets or replaces all elements forstageDescriptorslist.staticDataLoaders(Map<String, ? extends StaticDataLoader> entries) Sets or replaces all mappings from the specified map as entries for thestaticDataLoadersmap.
-
Field Details
-
staticDataLoaders
-
stageDescriptors
-
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
from
Fill a builder with attribute values from the providedMultiStageDescriptorinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
putStaticDataLoaders
public final ImmutableMultiStageDescriptor.Builder putStaticDataLoaders(String key, StaticDataLoader value) Put one entry to thestaticDataLoadersmap.- Parameters:
key- The key in the staticDataLoaders mapvalue- The associated value in the staticDataLoaders map- Returns:
thisbuilder for use in a chained invocation
-
putStaticDataLoaders
public final ImmutableMultiStageDescriptor.Builder putStaticDataLoaders(Map.Entry<String, ? extends StaticDataLoader> entry) Put one entry to thestaticDataLoadersmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
staticDataLoaders
public final ImmutableMultiStageDescriptor.Builder staticDataLoaders(Map<String, ? extends StaticDataLoader> entries) Sets or replaces all mappings from the specified map as entries for thestaticDataLoadersmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the staticDataLoaders map- Returns:
thisbuilder for use in a chained invocation
-
putAllStaticDataLoaders
public final ImmutableMultiStageDescriptor.Builder putAllStaticDataLoaders(Map<String, ? extends StaticDataLoader> entries) Put all mappings from the specified map as entries tostaticDataLoadersmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the staticDataLoaders map- Returns:
thisbuilder for use in a chained invocation
-
addStageDescriptors
Adds one element tostageDescriptorslist.- Parameters:
element- A stageDescriptors element- Returns:
thisbuilder for use in a chained invocation
-
addStageDescriptors
Adds elements tostageDescriptorslist.- Parameters:
elements- An array of stageDescriptors elements- Returns:
thisbuilder for use in a chained invocation
-
stageDescriptors
public final ImmutableMultiStageDescriptor.Builder stageDescriptors(Iterable<? extends StageDescriptor> elements) Sets or replaces all elements forstageDescriptorslist.- Parameters:
elements- An iterable of stageDescriptors elements- Returns:
thisbuilder for use in a chained invocation
-
addAllStageDescriptors
public final ImmutableMultiStageDescriptor.Builder addAllStageDescriptors(Iterable<? extends StageDescriptor> elements) Adds elements tostageDescriptorslist.- Parameters:
elements- An iterable of stageDescriptors elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newMultiStageDescriptor.- Returns:
- An immutable instance of MultiStageDescriptor
- Throws:
IllegalStateException- if any required attributes are missing
-