Class ImmutableMultiMutations
java.lang.Object
net.bmahe.genetics4j.core.spec.mutation.MultiMutations
net.bmahe.genetics4j.core.spec.mutation.ImmutableMultiMutations
- All Implemented Interfaces:
MutationPolicy
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableMultiMutations
extends MultiMutations
Immutable implementation of
MultiMutations
.
Use the builder to create immutable instances:
ImmutableMultiMutations.builder()
.
Use the static factory method to create immutable instances:
ImmutableMultiMutations.of()
.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableMultiMutations
. -
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprivate
ImmutableMultiMutations
(Iterable<? extends MutationPolicy> mutationPolicies) private
ImmutableMultiMutations
(ImmutableMultiMutations original, List<MutationPolicy> mutationPolicies) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableMultiMutations
.static ImmutableMultiMutations
copyOf
(MultiMutations instance) Creates an immutable copy of aMultiMutations
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) boolean
This instance is equal to all instances ofImmutableMultiMutations
that have equal attribute values.private boolean
equalTo
(int synthetic, ImmutableMultiMutations another) int
hashCode()
Computes a hash code from attributes:mutationPolicies
.static ImmutableMultiMutations
of
(Iterable<? extends MutationPolicy> mutationPolicies) Construct a new immutableMultiMutations
instance.static ImmutableMultiMutations
of
(List<MutationPolicy> mutationPolicies) Construct a new immutableMultiMutations
instance.toString()
Prints the immutable valueMultiMutations
with attribute values.private static ImmutableMultiMutations
validate
(ImmutableMultiMutations instance) final ImmutableMultiMutations
withMutationPolicies
(Iterable<? extends MutationPolicy> elements) Copy the current immutable object with elements that replace the content ofmutationPolicies
.final ImmutableMultiMutations
withMutationPolicies
(MutationPolicy... elements) Copy the current immutable object with elements that replace the content ofmutationPolicies
.Methods inherited from class net.bmahe.genetics4j.core.spec.mutation.MultiMutations
check, of
-
Field Details
-
mutationPolicies
-
-
Constructor Details
-
ImmutableMultiMutations
-
ImmutableMultiMutations
private ImmutableMultiMutations(ImmutableMultiMutations original, List<MutationPolicy> mutationPolicies)
-
-
Method Details
-
mutationPolicies
- Specified by:
mutationPolicies
in classMultiMutations
- Returns:
- The value of the
mutationPolicies
attribute
-
withMutationPolicies
Copy the current immutable object with elements that replace the content ofmutationPolicies
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withMutationPolicies
public final ImmutableMultiMutations withMutationPolicies(Iterable<? extends MutationPolicy> elements) Copy the current immutable object with elements that replace the content ofmutationPolicies
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of mutationPolicies elements to set- Returns:
- A modified copy of
this
object
-
equals
This instance is equal to all instances ofImmutableMultiMutations
that have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:mutationPolicies
. -
toString
Prints the immutable valueMultiMutations
with attribute values. -
of
Construct a new immutableMultiMutations
instance.- Parameters:
mutationPolicies
- The value for themutationPolicies
attribute- Returns:
- An immutable MultiMutations instance
-
of
Construct a new immutableMultiMutations
instance.- Parameters:
mutationPolicies
- The value for themutationPolicies
attribute- Returns:
- An immutable MultiMutations instance
-
validate
-
copyOf
Creates an immutable copy of aMultiMutations
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 MultiMutations instance
-
builder
Creates a builder forImmutableMultiMutations
.ImmutableMultiMutations.builder() .addMutationPolicies|addAllMutationPolicies(net.bmahe.genetics4j.core.spec.mutation.MutationPolicy) //
mutationPolicies
elements .build();- Returns:
- A new ImmutableMultiMutations builder
-
createSafeList
-
createUnmodifiableList
-