Record Class ConstraintGroupInfo

java.lang.Object
java.lang.Record
ai.timefold.solver.service.definition.api.description.ConstraintGroupInfo
Record Components:
id - Stable unique identifier of the constraint group.
name - Human-readable name of the constraint group.
description - Explanation of what constraints in this group represent.
icon - Icon name for this constraint group. Any icon name from Tabler Icons is valid.
tags - Optional tags that can be used to classify or filter the constraint group.

@NullMarked public record ConstraintGroupInfo(String id, @Nullable String name, @Nullable String description, @Nullable String icon, @Nullable String[] tags) extends Record
Groups related constraints into a single category for model description.
  • Constructor Details

    • ConstraintGroupInfo

      public ConstraintGroupInfo(String id, @Nullable String name, @Nullable String description, @Nullable String icon, @Nullable String[] tags)
      Creates an instance of a ConstraintGroupInfo record class.
      Parameters:
      id - the value for the id record component
      name - the value for the name record component
      description - the value for the description record component
      icon - the value for the icon record component
      tags - the value for the tags record component
  • Method Details

    • equals

      public 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.
    • hashCode

      public 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
    • toString

      public 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
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • name

      public @Nullable String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • description

      public @Nullable String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • icon

      public @Nullable String icon()
      Returns the value of the icon record component.
      Returns:
      the value of the icon record component
    • tags

      public @Nullable String[] tags()
      Returns the value of the tags record component.
      Returns:
      the value of the tags record component