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().

  • Field Details

  • Constructor Details

  • Method Details

    • combinationPolicies

      public List<CombinationPolicy> combinationPolicies()
      Specified by:
      combinationPolicies in class MultiCombinations
      Returns:
      The value of the combinationPolicies attribute
    • withCombinationPolicies

      public final ImmutableMultiCombinations withCombinationPolicies(CombinationPolicy... elements)
      Copy the current immutable object with elements that replace the content of combinationPolicies.
      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 of combinationPolicies. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of combinationPolicies elements to set
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of ImmutableMultiCombinations that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • equalTo

      private boolean equalTo(int synthetic, ImmutableMultiCombinations another)
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: combinationPolicies.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value MultiCombinations with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • of

      public static ImmutableMultiCombinations of(List<CombinationPolicy> combinationPolicies)
      Construct a new immutable MultiCombinations instance.
      Parameters:
      combinationPolicies - The value for the combinationPolicies attribute
      Returns:
      An immutable MultiCombinations instance
    • of

      public static ImmutableMultiCombinations of(Iterable<? extends CombinationPolicy> combinationPolicies)
      Construct a new immutable MultiCombinations instance.
      Parameters:
      combinationPolicies - The value for the combinationPolicies attribute
      Returns:
      An immutable MultiCombinations instance
    • validate

      private static ImmutableMultiCombinations validate(ImmutableMultiCombinations instance)
    • copyOf

      public static ImmutableMultiCombinations copyOf(MultiCombinations instance)
      Creates an immutable copy of a MultiCombinations 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

      public static ImmutableMultiCombinations.Builder builder()
      Creates a builder for ImmutableMultiCombinations.
       ImmutableMultiCombinations.builder()
          .addCombinationPolicies|addAllCombinationPolicies(net.bmahe.genetics4j.core.spec.combination.CombinationPolicy) // combinationPolicies elements
          .build();
       
      Returns:
      A new ImmutableMultiCombinations builder
    • createSafeList

      private static <T> List<T> createSafeList(Iterable<? extends T> iterable, boolean checkNulls, boolean skipNulls)
    • createUnmodifiableList

      private static <T> List<T> createUnmodifiableList(boolean clone, List<T> list)