Class ImmutableMultiStageDescriptor

java.lang.Object
net.bmahe.genetics4j.gpu.spec.fitness.multistage.ImmutableMultiStageDescriptor
All Implemented Interfaces:
MultiStageDescriptor

@Generated("org.immutables.processor.ProxyProcessor") public final class ImmutableMultiStageDescriptor extends Object implements MultiStageDescriptor
Immutable implementation of MultiStageDescriptor.

Use the builder to create immutable instances: ImmutableMultiStageDescriptor.builder().

  • Field Details

  • Constructor Details

  • Method Details

    • staticDataLoaders

      public Map<String,StaticDataLoader> staticDataLoaders()
      Specified by:
      staticDataLoaders in interface MultiStageDescriptor
      Returns:
      The value of the staticDataLoaders attribute
    • stageDescriptors

      public List<StageDescriptor> stageDescriptors()
      Specified by:
      stageDescriptors in interface MultiStageDescriptor
      Returns:
      The value of the stageDescriptors attribute
    • withStaticDataLoaders

      public final ImmutableMultiStageDescriptor withStaticDataLoaders(Map<String,? extends StaticDataLoader> entries)
      Copy the current immutable object by replacing the staticDataLoaders map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to be added to the staticDataLoaders map
      Returns:
      A modified copy of this object
    • withStageDescriptors

      public final ImmutableMultiStageDescriptor withStageDescriptors(StageDescriptor... elements)
      Copy the current immutable object with elements that replace the content of stageDescriptors.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withStageDescriptors

      public final ImmutableMultiStageDescriptor withStageDescriptors(Iterable<? extends StageDescriptor> elements)
      Copy the current immutable object with elements that replace the content of stageDescriptors. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of stageDescriptors elements to set
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of ImmutableMultiStageDescriptor 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, ImmutableMultiStageDescriptor another)
    • hashCode

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

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

    • copyOf

      public static ImmutableMultiStageDescriptor copyOf(MultiStageDescriptor instance)
      Creates an immutable copy of a MultiStageDescriptor 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 MultiStageDescriptor instance
    • builder

      public static ImmutableMultiStageDescriptor.Builder builder()
      Creates a builder for ImmutableMultiStageDescriptor.
       ImmutableMultiStageDescriptor.builder()
          .putStaticDataLoaders|putAllStaticDataLoaders(String => net.bmahe.genetics4j.gpu.spec.fitness.cldata.StaticDataLoader) // staticDataLoaders mappings
          .addStageDescriptors|addAllStageDescriptors(net.bmahe.genetics4j.gpu.spec.fitness.multistage.StageDescriptor) // stageDescriptors elements
          .build();
       
      Returns:
      A new ImmutableMultiStageDescriptor 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)
    • createUnmodifiableMap

      private static <K, V> Map<K,V> createUnmodifiableMap(boolean checkNulls, boolean skipNulls, Map<? extends K,? extends V> map)