Class ImmutableCLData.Builder

java.lang.Object
net.bmahe.genetics4j.gpu.spec.fitness.cldata.ImmutableCLData.Builder
Enclosing class:
ImmutableCLData

public static final class ImmutableCLData.Builder extends Object
Builds instances of type ImmutableCLData. Initialize attributes and then invoke the build() method to create an immutable instance.

Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

  • Field Details Link icon

    • INIT_BIT_CL_MEM Link icon

      private static final long INIT_BIT_CL_MEM
      See Also:
    • INIT_BIT_CL_TYPE Link icon

      private static final long INIT_BIT_CL_TYPE
      See Also:
    • INIT_BIT_SIZE Link icon

      private static final long INIT_BIT_SIZE
      See Also:
    • initBits Link icon

      private long initBits
    • clMem Link icon

      private org.jocl.cl_mem clMem
    • clType Link icon

      private int clType
    • size Link icon

      private int size
  • Constructor Details Link icon

    • Builder Link icon

      private Builder()
  • Method Details Link icon

    • from Link icon

      public final ImmutableCLData.Builder from(CLData instance)
      Fill a builder with attribute values from the provided CLData instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • clMem Link icon

      public final ImmutableCLData.Builder clMem(org.jocl.cl_mem clMem)
      Initializes the value for the clMem attribute.
      Parameters:
      clMem - The value for clMem
      Returns:
      this builder for use in a chained invocation
    • clType Link icon

      public final ImmutableCLData.Builder clType(int clType)
      Initializes the value for the clType attribute.
      Parameters:
      clType - The value for clType
      Returns:
      this builder for use in a chained invocation
    • size Link icon

      public final ImmutableCLData.Builder size(int size)
      Initializes the value for the size attribute.
      Parameters:
      size - The value for size
      Returns:
      this builder for use in a chained invocation
    • build Link icon

      public ImmutableCLData build()
      Builds a new ImmutableCLData.
      Returns:
      An immutable instance of CLData
      Throws:
      IllegalStateException - if any required attributes are missing
    • formatRequiredAttributesMessage Link icon

      private String formatRequiredAttributesMessage()