Record Class InputMetricDescriptor
java.lang.Object
java.lang.Record
ai.timefold.solver.service.definition.internal.descriptor.InputMetricDescriptor
public record InputMetricDescriptor(String id, String name, String description, DataFormat type, Integer priority, String example, String exampleFormatted)
extends Record
Defines InputMetric of the model where information is retrieved from
ModelInputMetric class of the model
- id - usually the field of the class representing given InputMetric
- name - human readable name
- description - human readable description of the InputMetric
- type - type of the InputMetric that provides information how to handle given InputMetric and what operations can be performed on it e.g. number, duration, distance_meters
- priority - order in which InputMetric should be presented
- example - value that this InputMetric can hold
- exampleFormatted - example but formatted according to given type .e.g distance in meters can be presented in kilometers for better readability
-
Constructor Summary
ConstructorsConstructorDescriptionInputMetricDescriptor(String id, String name, String description, DataFormat type, Integer priority, String example, String exampleFormatted) Creates an instance of aInputMetricDescriptorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.example()Returns the value of theexamplerecord component.Returns the value of theexampleFormattedrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.name()Returns the value of thenamerecord component.priority()Returns the value of thepriorityrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
InputMetricDescriptor
public InputMetricDescriptor(String id, String name, String description, DataFormat type, Integer priority, String example, String exampleFormatted) Creates an instance of aInputMetricDescriptorrecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componentdescription- the value for thedescriptionrecord componenttype- the value for thetyperecord componentpriority- the value for thepriorityrecord componentexample- the value for theexamplerecord componentexampleFormatted- the value for theexampleFormattedrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
priority
Returns the value of thepriorityrecord component.- Returns:
- the value of the
priorityrecord component
-
example
Returns the value of theexamplerecord component.- Returns:
- the value of the
examplerecord component
-
exampleFormatted
Returns the value of theexampleFormattedrecord component.- Returns:
- the value of the
exampleFormattedrecord component
-