Class ImmutableProgramApplyRules
java.lang.Object
net.bmahe.genetics4j.gp.spec.mutation.ImmutableProgramApplyRules
- All Implemented Interfaces:
MutationPolicy
,ProgramApplyRules
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableProgramApplyRules
extends Object
implements ProgramApplyRules
Immutable implementation of
ProgramApplyRules
.
Use the builder to create immutable instances:
ImmutableProgramApplyRules.builder()
.
Use the static factory method to create immutable instances:
ImmutableProgramApplyRules.of()
.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableProgramApplyRules
. -
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprivate
ImmutableProgramApplyRules
(Iterable<? extends Rule> rules) private
ImmutableProgramApplyRules
(ImmutableProgramApplyRules original, List<Rule> rules) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableProgramApplyRules
.static ImmutableProgramApplyRules
copyOf
(ProgramApplyRules instance) Creates an immutable copy of aProgramApplyRules
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 ofImmutableProgramApplyRules
that have equal attribute values.private boolean
equalTo
(int synthetic, ImmutableProgramApplyRules another) int
hashCode()
Computes a hash code from attributes:rules
.static ImmutableProgramApplyRules
Construct a new immutableProgramApplyRules
instance.static ImmutableProgramApplyRules
Construct a new immutableProgramApplyRules
instance.rules()
toString()
Prints the immutable valueProgramApplyRules
with attribute values.Copy the current immutable object with elements that replace the content ofrules
.Copy the current immutable object with elements that replace the content ofrules
.
-
Field Details
-
rules
-
-
Constructor Details
-
ImmutableProgramApplyRules
-
ImmutableProgramApplyRules
-
-
Method Details
-
rules
- Specified by:
rules
in interfaceProgramApplyRules
- Returns:
- The value of the
rules
attribute
-
withRules
Copy the current immutable object with elements that replace the content ofrules
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withRules
Copy the current immutable object with elements that replace the content ofrules
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of rules elements to set- Returns:
- A modified copy of
this
object
-
equals
This instance is equal to all instances ofImmutableProgramApplyRules
that have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:rules
. -
toString
Prints the immutable valueProgramApplyRules
with attribute values. -
of
Construct a new immutableProgramApplyRules
instance.- Parameters:
rules
- The value for therules
attribute- Returns:
- An immutable ProgramApplyRules instance
-
of
Construct a new immutableProgramApplyRules
instance.- Parameters:
rules
- The value for therules
attribute- Returns:
- An immutable ProgramApplyRules instance
-
copyOf
Creates an immutable copy of aProgramApplyRules
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 ProgramApplyRules instance
-
builder
Creates a builder forImmutableProgramApplyRules
.ImmutableProgramApplyRules.builder() .addRules|addAllRules(net.bmahe.genetics4j.gp.spec.mutation.Rule) //
rules
elements .build();- Returns:
- A new ImmutableProgramApplyRules builder
-
createSafeList
-
createUnmodifiableList
-