Package net.bmahe.genetics4j.gp
Class ImmutableInputSpec
java.lang.Object
net.bmahe.genetics4j.gp.InputSpec
net.bmahe.genetics4j.gp.ImmutableInputSpec
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableInputSpec
extends InputSpec
Immutable implementation of
InputSpec
.
Use the builder to create immutable instances:
ImmutableInputSpec.builder()
.
Use the static factory method to create immutable instances:
ImmutableInputSpec.of()
.
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprivate
ImmutableInputSpec
(Iterable<? extends Class> types) private
ImmutableInputSpec
(ImmutableInputSpec original, List<Class> types) -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableInputSpec.Builder
builder()
Creates a builder forImmutableInputSpec
.static ImmutableInputSpec
Creates an immutable copy of aInputSpec
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 ofImmutableInputSpec
that have equal attribute values.private boolean
equalTo
(int synthetic, ImmutableInputSpec another) int
hashCode()
Computes a hash code from attributes:types
.static ImmutableInputSpec
Construct a new immutableInputSpec
instance.static ImmutableInputSpec
Construct a new immutableInputSpec
instance.toString()
Prints the immutable valueInputSpec
with attribute values.types()
final ImmutableInputSpec
Copy the current immutable object with elements that replace the content oftypes
.final ImmutableInputSpec
Copy the current immutable object with elements that replace the content oftypes
.
-
Field Details
-
types
-
-
Constructor Details
-
ImmutableInputSpec
-
ImmutableInputSpec
-
-
Method Details
-
types
-
withTypes
Copy the current immutable object with elements that replace the content oftypes
.- Parameters:
elements
- The elements to set- Returns:
- A modified copy of
this
object
-
withTypes
Copy the current immutable object with elements that replace the content oftypes
. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
elements
- An iterable of types elements to set- Returns:
- A modified copy of
this
object
-
equals
This instance is equal to all instances ofImmutableInputSpec
that have equal attribute values. -
equalTo
-
hashCode
public int hashCode()Computes a hash code from attributes:types
. -
toString
Prints the immutable valueInputSpec
with attribute values. -
of
Construct a new immutableInputSpec
instance.- Parameters:
types
- The value for thetypes
attribute- Returns:
- An immutable InputSpec instance
-
of
Construct a new immutableInputSpec
instance.- Parameters:
types
- The value for thetypes
attribute- Returns:
- An immutable InputSpec instance
-
copyOf
Creates an immutable copy of aInputSpec
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 InputSpec instance
-
builder
Creates a builder forImmutableInputSpec
.ImmutableInputSpec.builder() .addTypes|addAllTypes(Class) //
types
elements .build();- Returns:
- A new ImmutableInputSpec builder
-
createSafeList
-
createUnmodifiableList
-