Package net.bmahe.genetics4j.gp
Class ImmutableInputSpec
java.lang.Object
net.bmahe.genetics4j.gp.InputSpec
net.bmahe.genetics4j.gp.ImmutableInputSpec
@Generated(from="InputSpec",
generator="Immutables")
@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
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateImmutableInputSpec(Iterable<? extends Class> types) privateImmutableInputSpec(ImmutableInputSpec original, List<Class> types) -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableInputSpec.Builderbuilder()Creates a builder forInputSpec.static InputSpecCreates an immutable copy of aInputSpecvalue.private static <T> List<T> createSafeList(Iterable<? extends T> iterable, boolean checkNulls, boolean skipNulls) private static <T> List<T> createUnmodifiableList(boolean clone, List<? extends T> list) booleanThis instance is equal to all instances ofImmutableInputSpecthat have equal attribute values.private booleanequalsByValue(ImmutableInputSpec another) inthashCode()Computes a hash code from attributes:types.static InputSpecConstruct a new immutableInputSpecinstance.static InputSpecConstruct a new immutableInputSpecinstance.toString()Prints the immutable valueInputSpecwith attribute values.types()final ImmutableInputSpecCopy the current immutable object with elements that replace the content oftypes.final ImmutableInputSpecCopy 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
thisobject
-
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 or
thisif not changed
-
equals
This instance is equal to all instances ofImmutableInputSpecthat have equal attribute values. -
equalsByValue
-
hashCode
public int hashCode()Computes a hash code from attributes:types. -
toString
Prints the immutable valueInputSpecwith attribute values. -
of
Construct a new immutableInputSpecinstance.- Parameters:
types- The value for thetypesattribute- Returns:
- An immutable InputSpec instance
-
of
Construct a new immutableInputSpecinstance.- Parameters:
types- The value for thetypesattribute- Returns:
- An immutable InputSpec instance
-
copyOf
Creates an immutable copy of aInputSpecvalue. 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 forInputSpec.ImmutableInputSpec.builder() .addTypes|addAllTypes(Class) //typeselements .build();- Returns:
- A new InputSpec builder
-
createSafeList
-
createUnmodifiableList
-