Class ImmutableMultiStageDescriptor
java.lang.Object
net.bmahe.genetics4j.gpu.spec.fitness.multistage.ImmutableMultiStageDescriptor
- All Implemented Interfaces:
MultiStageDescriptor
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableMultiStageDescriptor
extends Object
implements MultiStageDescriptor
Immutable implementation of
MultiStageDescriptor
.
Use the builder to create immutable instances:
ImmutableMultiStageDescriptor.builder()
.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableMultiStageDescriptor
. -
Field Summary
Modifier and TypeFieldDescriptionprivate final List
<StageDescriptor> private final Map
<String, StaticDataLoader> -
Constructor Summary
ModifierConstructorDescriptionprivate
ImmutableMultiStageDescriptor
(Map<String, StaticDataLoader> staticDataLoaders, List<StageDescriptor> stageDescriptors) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableMultiStageDescriptor
.copyOf
(MultiStageDescriptor instance) Creates an immutable copy of aMultiStageDescriptor
value.private static <T> List
<T> createSafeList
(Iterable<? extends T> iterable, boolean checkNulls, boolean skipNulls) private static <T> List
<T> createUnmodifiableList
(boolean clone, List<T> list) private static <K,
V> Map <K, V> createUnmodifiableMap
(boolean checkNulls, boolean skipNulls, Map<? extends K, ? extends V> map) boolean
This instance is equal to all instances ofImmutableMultiStageDescriptor
that have equal attribute values.private boolean
equalTo
(int synthetic, ImmutableMultiStageDescriptor another) int
hashCode()
Computes a hash code from attributes:staticDataLoaders
,stageDescriptors
.toString()
Prints the immutable valueMultiStageDescriptor
with attribute values.private static ImmutableMultiStageDescriptor
validate
(ImmutableMultiStageDescriptor instance) withStageDescriptors
(Iterable<? extends StageDescriptor> elements) Copy the current immutable object with elements that replace the content ofstageDescriptors
.withStageDescriptors
(StageDescriptor... elements) Copy the current immutable object with elements that replace the content ofstageDescriptors
.withStaticDataLoaders
(Map<String, ? extends StaticDataLoader> entries) Copy the current immutable object by replacing thestaticDataLoaders
map with the specified map.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.bmahe.genetics4j.gpu.spec.fitness.multistage.MultiStageDescriptor
check
-
Field Details
-
staticDataLoaders
-
stageDescriptors
-
-
Constructor Details
-
ImmutableMultiStageDescriptor
private ImmutableMultiStageDescriptor(Map<String, StaticDataLoader> staticDataLoaders, List<StageDescriptor> stageDescriptors)
-
-
Method Details
-
staticDataLoaders
- Specified by:
staticDataLoaders
in interfaceMultiStageDescriptor
- Returns:
- The value of the
staticDataLoaders
attribute
-
stageDescriptors
- Specified by:
stageDescriptors
in interfaceMultiStageDescriptor
- Returns:
- The value of the
stageDescriptors
attribute
-
withStaticDataLoaders
public final ImmutableMultiStageDescriptor withStaticDataLoaders(Map<String, ? extends StaticDataLoader> entries) Copy the current immutable object by replacing thestaticDataLoaders
map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
entries
- The entries to be added to the staticDataLoaders map- Returns:
- A modified copy of
this
object
-
withStageDescriptors
Copy the current immutable object with elements that replace the content ofstageDescriptors
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withStageDescriptors
public final ImmutableMultiStageDescriptor withStageDescriptors(Iterable<? extends StageDescriptor> elements) Copy the current immutable object with elements that replace the content ofstageDescriptors
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of stageDescriptors elements to set- Returns:
- A modified copy of
this
object
-
equals
This instance is equal to all instances ofImmutableMultiStageDescriptor
that have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:staticDataLoaders
,stageDescriptors
. -
toString
Prints the immutable valueMultiStageDescriptor
with attribute values. -
validate
-
copyOf
Creates an immutable copy of aMultiStageDescriptor
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable MultiStageDescriptor instance
-
builder
Creates a builder forImmutableMultiStageDescriptor
.ImmutableMultiStageDescriptor.builder() .putStaticDataLoaders|putAllStaticDataLoaders(String => net.bmahe.genetics4j.gpu.spec.fitness.cldata.StaticDataLoader) //
staticDataLoaders
mappings .addStageDescriptors|addAllStageDescriptors(net.bmahe.genetics4j.gpu.spec.fitness.multistage.StageDescriptor) //stageDescriptors
elements .build();- Returns:
- A new ImmutableMultiStageDescriptor builder
-
createSafeList
-
createUnmodifiableList
-
createUnmodifiableMap
-