Class ImmutableMultiCombinations
java.lang.Object
net.bmahe.genetics4j.core.spec.combination.MultiCombinations
net.bmahe.genetics4j.core.spec.combination.ImmutableMultiCombinations
- All Implemented Interfaces:
CombinationPolicy
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableMultiCombinations
extends MultiCombinations
Immutable implementation of
MultiCombinations
.
Use the builder to create immutable instances:
ImmutableMultiCombinations.builder()
.
Use the static factory method to create immutable instances:
ImmutableMultiCombinations.of()
.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableMultiCombinations
. -
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprivate
ImmutableMultiCombinations
(Iterable<? extends CombinationPolicy> combinationPolicies) private
ImmutableMultiCombinations
(ImmutableMultiCombinations original, List<CombinationPolicy> combinationPolicies) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableMultiCombinations
.static ImmutableMultiCombinations
copyOf
(MultiCombinations instance) Creates an immutable copy of aMultiCombinations
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 ofImmutableMultiCombinations
that have equal attribute values.private boolean
equalTo
(int synthetic, ImmutableMultiCombinations another) int
hashCode()
Computes a hash code from attributes:combinationPolicies
.static ImmutableMultiCombinations
of
(Iterable<? extends CombinationPolicy> combinationPolicies) Construct a new immutableMultiCombinations
instance.static ImmutableMultiCombinations
of
(List<CombinationPolicy> combinationPolicies) Construct a new immutableMultiCombinations
instance.toString()
Prints the immutable valueMultiCombinations
with attribute values.private static ImmutableMultiCombinations
validate
(ImmutableMultiCombinations instance) withCombinationPolicies
(Iterable<? extends CombinationPolicy> elements) Copy the current immutable object with elements that replace the content ofcombinationPolicies
.withCombinationPolicies
(CombinationPolicy... elements) Copy the current immutable object with elements that replace the content ofcombinationPolicies
.Methods inherited from class net.bmahe.genetics4j.core.spec.combination.MultiCombinations
check, of
-
Field Details
-
combinationPolicies
-
-
Constructor Details
-
ImmutableMultiCombinations
-
ImmutableMultiCombinations
private ImmutableMultiCombinations(ImmutableMultiCombinations original, List<CombinationPolicy> combinationPolicies)
-
-
Method Details
-
combinationPolicies
- Specified by:
combinationPolicies
in classMultiCombinations
- Returns:
- The value of the
combinationPolicies
attribute
-
withCombinationPolicies
Copy the current immutable object with elements that replace the content ofcombinationPolicies
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withCombinationPolicies
public final ImmutableMultiCombinations withCombinationPolicies(Iterable<? extends CombinationPolicy> elements) Copy the current immutable object with elements that replace the content ofcombinationPolicies
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of combinationPolicies elements to set- Returns:
- A modified copy of
this
object
-
equals
This instance is equal to all instances ofImmutableMultiCombinations
that have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:combinationPolicies
. -
toString
Prints the immutable valueMultiCombinations
with attribute values. -
of
Construct a new immutableMultiCombinations
instance.- Parameters:
combinationPolicies
- The value for thecombinationPolicies
attribute- Returns:
- An immutable MultiCombinations instance
-
of
public static ImmutableMultiCombinations of(Iterable<? extends CombinationPolicy> combinationPolicies) Construct a new immutableMultiCombinations
instance.- Parameters:
combinationPolicies
- The value for thecombinationPolicies
attribute- Returns:
- An immutable MultiCombinations instance
-
validate
-
copyOf
Creates an immutable copy of aMultiCombinations
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 MultiCombinations instance
-
builder
Creates a builder forImmutableMultiCombinations
.ImmutableMultiCombinations.builder() .addCombinationPolicies|addAllCombinationPolicies(net.bmahe.genetics4j.core.spec.combination.CombinationPolicy) //
combinationPolicies
elements .build();- Returns:
- A new ImmutableMultiCombinations builder
-
createSafeList
-
createUnmodifiableList
-