Record Class RunConfiguration

java.lang.Object
java.lang.Record
ai.timefold.solver.service.definition.api.domain.RunConfiguration

public record RunConfiguration(@Size(min=0,max=255) String name, SolverTerminationConfig termination, @Positive Integer maxThreadCount, @Size(max=100) Set<String> tags) extends Record
  • Constructor Details

    • RunConfiguration

      public RunConfiguration(String name, SolverTerminationConfig termination, Integer maxThreadCount, Set<String> tags)
      Creates an instance of a RunConfiguration record class.
      Parameters:
      name - the value for the name record component
      termination - the value for the termination record component
      maxThreadCount - the value for the maxThreadCount record component
      tags - the value for the tags record component
    • RunConfiguration

      public RunConfiguration(String name, SolverTerminationConfig termination)
    • RunConfiguration

      public RunConfiguration(Integer maxThreadCount, SolverTerminationConfig termination)
    • RunConfiguration

      public RunConfiguration(String name)
  • Method Details

    • withTermination

      public RunConfiguration withTermination(SolverTerminationConfig termination)
      Returns a copy of this instance with given termination.
      Parameters:
      termination - the termination configuration to set in the created copy
      Returns:
      a copy of this instance with given termination, never null
    • override

      public RunConfiguration override(RunConfiguration configuration)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      @Size(min=0, max=255) public @Size(min=0,max=255) String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • termination

      public SolverTerminationConfig termination()
      Returns the value of the termination record component.
      Returns:
      the value of the termination record component
    • maxThreadCount

      @Positive public @Positive Integer maxThreadCount()
      Returns the value of the maxThreadCount record component.
      Returns:
      the value of the maxThreadCount record component
    • tags

      @Size(max=100) public @Size(max=100) Set<String> tags()
      Returns the value of the tags record component.
      Returns:
      the value of the tags record component