Class ImmutableSingleKernelFitnessDescriptor.Builder
java.lang.Object
net.bmahe.genetics4j.gpu.spec.fitness.ImmutableSingleKernelFitnessDescriptor.Builder
- Direct Known Subclasses:
SingleKernelFitnessDescriptor.Builder
- Enclosing class:
ImmutableSingleKernelFitnessDescriptor
@Generated(from="SingleKernelFitnessDescriptor",
generator="Immutables")
public static class ImmutableSingleKernelFitnessDescriptor.Builder
extends Object
Builds instances of type
SingleKernelFitnessDescriptor.
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 Map<Integer, DataLoader> private static final longprivate static final longprivate longprivate KernelExecutionContextComputerprivate Stringprivate Map<Integer, LocalMemoryAllocator> private Map<Integer, ResultAllocator> private Map<Integer, StaticDataLoader> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newSingleKernelFitnessDescriptor.dataLoaders(Map<Integer, ? extends DataLoader> entries) Sets or replaces all mappings from the specified map as entries for thedataLoadersmap.private Stringfrom(SingleKernelFitnessDescriptor instance) Fill a builder with attribute values from the providedSingleKernelFitnessDescriptorinstance.kernelExecutionContextComputer(KernelExecutionContextComputer kernelExecutionContextComputer) Initializes the value for thekernelExecutionContextComputerattribute.kernelName(String kernelName) Initializes the value for thekernelNameattribute.localMemoryAllocators(Map<Integer, ? extends LocalMemoryAllocator> entries) Sets or replaces all mappings from the specified map as entries for thelocalMemoryAllocatorsmap.putAllDataLoaders(Map<Integer, ? extends DataLoader> entries) Put all mappings from the specified map as entries todataLoadersmap.putAllLocalMemoryAllocators(Map<Integer, ? extends LocalMemoryAllocator> entries) Put all mappings from the specified map as entries tolocalMemoryAllocatorsmap.putAllResultAllocators(Map<Integer, ? extends ResultAllocator> entries) Put all mappings from the specified map as entries toresultAllocatorsmap.putAllStaticDataLoaders(Map<Integer, ? extends StaticDataLoader> entries) Put all mappings from the specified map as entries tostaticDataLoadersmap.putDataLoaders(int key, DataLoader value) Put one entry to thedataLoadersmap.putDataLoaders(Map.Entry<Integer, ? extends DataLoader> entry) Put one entry to thedataLoadersmap.putLocalMemoryAllocators(int key, LocalMemoryAllocator value) Put one entry to thelocalMemoryAllocatorsmap.putLocalMemoryAllocators(Map.Entry<Integer, ? extends LocalMemoryAllocator> entry) Put one entry to thelocalMemoryAllocatorsmap.putResultAllocators(int key, ResultAllocator value) Put one entry to theresultAllocatorsmap.putResultAllocators(Map.Entry<Integer, ? extends ResultAllocator> entry) Put one entry to theresultAllocatorsmap.putStaticDataLoaders(int key, StaticDataLoader value) Put one entry to thestaticDataLoadersmap.putStaticDataLoaders(Map.Entry<Integer, ? extends StaticDataLoader> entry) Put one entry to thestaticDataLoadersmap.resultAllocators(Map<Integer, ? extends ResultAllocator> entries) Sets or replaces all mappings from the specified map as entries for theresultAllocatorsmap.staticDataLoaders(Map<Integer, ? extends StaticDataLoader> entries) Sets or replaces all mappings from the specified map as entries for thestaticDataLoadersmap.
-
Field Details
-
INIT_BIT_KERNEL_NAME
private static final long INIT_BIT_KERNEL_NAME- See Also:
-
INIT_BIT_KERNEL_EXECUTION_CONTEXT_COMPUTER
private static final long INIT_BIT_KERNEL_EXECUTION_CONTEXT_COMPUTER- See Also:
-
initBits
private long initBits -
kernelName
-
kernelExecutionContextComputer
-
staticDataLoaders
-
dataLoaders
-
localMemoryAllocators
-
resultAllocators
-
-
Constructor Details
-
Builder
public Builder()Creates a builder forSingleKernelFitnessDescriptorinstances.new SingleKernelFitnessDescriptor.Builder() .kernelName(String) // requiredkernelName.kernelExecutionContextComputer(net.bmahe.genetics4j.gpu.spec.fitness.kernelcontext.KernelExecutionContextComputer) // requiredkernelExecutionContextComputer.putStaticDataLoaders|putAllStaticDataLoaders(int => net.bmahe.genetics4j.gpu.spec.fitness.cldata.StaticDataLoader) //staticDataLoadersmappings .putDataLoaders|putAllDataLoaders(int => net.bmahe.genetics4j.gpu.spec.fitness.cldata.DataLoader) //dataLoadersmappings .putLocalMemoryAllocators|putAllLocalMemoryAllocators(int => net.bmahe.genetics4j.gpu.spec.fitness.cldata.LocalMemoryAllocator) //localMemoryAllocatorsmappings .putResultAllocators|putAllResultAllocators(int => net.bmahe.genetics4j.gpu.spec.fitness.cldata.ResultAllocator) //resultAllocatorsmappings .build();
-
-
Method Details
-
from
Fill a builder with attribute values from the providedSingleKernelFitnessDescriptorinstance. 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
-
kernelName
Initializes the value for thekernelNameattribute.- Parameters:
kernelName- The value for kernelName- Returns:
thisbuilder for use in a chained invocation
-
kernelExecutionContextComputer
public final SingleKernelFitnessDescriptor.Builder kernelExecutionContextComputer(KernelExecutionContextComputer kernelExecutionContextComputer) Initializes the value for thekernelExecutionContextComputerattribute.- Parameters:
kernelExecutionContextComputer- The value for kernelExecutionContextComputer- Returns:
thisbuilder for use in a chained invocation
-
putStaticDataLoaders
public final SingleKernelFitnessDescriptor.Builder putStaticDataLoaders(int 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 SingleKernelFitnessDescriptor.Builder putStaticDataLoaders(Map.Entry<Integer, ? 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 SingleKernelFitnessDescriptor.Builder staticDataLoaders(Map<Integer, ? 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 SingleKernelFitnessDescriptor.Builder putAllStaticDataLoaders(Map<Integer, ? 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
-
putDataLoaders
Put one entry to thedataLoadersmap.- Parameters:
key- The key in the dataLoaders mapvalue- The associated value in the dataLoaders map- Returns:
thisbuilder for use in a chained invocation
-
putDataLoaders
public final SingleKernelFitnessDescriptor.Builder putDataLoaders(Map.Entry<Integer, ? extends DataLoader> entry) Put one entry to thedataLoadersmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
dataLoaders
public final SingleKernelFitnessDescriptor.Builder dataLoaders(Map<Integer, ? extends DataLoader> entries) Sets or replaces all mappings from the specified map as entries for thedataLoadersmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the dataLoaders map- Returns:
thisbuilder for use in a chained invocation
-
putAllDataLoaders
public final SingleKernelFitnessDescriptor.Builder putAllDataLoaders(Map<Integer, ? extends DataLoader> entries) Put all mappings from the specified map as entries todataLoadersmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the dataLoaders map- Returns:
thisbuilder for use in a chained invocation
-
putLocalMemoryAllocators
public final SingleKernelFitnessDescriptor.Builder putLocalMemoryAllocators(int key, LocalMemoryAllocator value) Put one entry to thelocalMemoryAllocatorsmap.- Parameters:
key- The key in the localMemoryAllocators mapvalue- The associated value in the localMemoryAllocators map- Returns:
thisbuilder for use in a chained invocation
-
putLocalMemoryAllocators
public final SingleKernelFitnessDescriptor.Builder putLocalMemoryAllocators(Map.Entry<Integer, ? extends LocalMemoryAllocator> entry) Put one entry to thelocalMemoryAllocatorsmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
localMemoryAllocators
public final SingleKernelFitnessDescriptor.Builder localMemoryAllocators(Map<Integer, ? extends LocalMemoryAllocator> entries) Sets or replaces all mappings from the specified map as entries for thelocalMemoryAllocatorsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the localMemoryAllocators map- Returns:
thisbuilder for use in a chained invocation
-
putAllLocalMemoryAllocators
public final SingleKernelFitnessDescriptor.Builder putAllLocalMemoryAllocators(Map<Integer, ? extends LocalMemoryAllocator> entries) Put all mappings from the specified map as entries tolocalMemoryAllocatorsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the localMemoryAllocators map- Returns:
thisbuilder for use in a chained invocation
-
putResultAllocators
public final SingleKernelFitnessDescriptor.Builder putResultAllocators(int key, ResultAllocator value) Put one entry to theresultAllocatorsmap.- Parameters:
key- The key in the resultAllocators mapvalue- The associated value in the resultAllocators map- Returns:
thisbuilder for use in a chained invocation
-
putResultAllocators
public final SingleKernelFitnessDescriptor.Builder putResultAllocators(Map.Entry<Integer, ? extends ResultAllocator> entry) Put one entry to theresultAllocatorsmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
resultAllocators
public final SingleKernelFitnessDescriptor.Builder resultAllocators(Map<Integer, ? extends ResultAllocator> entries) Sets or replaces all mappings from the specified map as entries for theresultAllocatorsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the resultAllocators map- Returns:
thisbuilder for use in a chained invocation
-
putAllResultAllocators
public final SingleKernelFitnessDescriptor.Builder putAllResultAllocators(Map<Integer, ? extends ResultAllocator> entries) Put all mappings from the specified map as entries toresultAllocatorsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the resultAllocators map- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newSingleKernelFitnessDescriptor.- Returns:
- An immutable instance of SingleKernelFitnessDescriptor
- Throws:
IllegalStateException- if any required attributes are missing
-
formatRequiredAttributesMessage
-